From 92a1daba3a11c027e491c4850dc35163f4a142b1 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 16 Oct 2014 10:56:25 +0300 Subject: [PATCH] staging: lustre: silence a static checker warning Static checkers warn that if cfs_cpt_table_print() returns an error other than -EFBIG, then it would lead to a double free. This is true but cfs_cpt_table_print() only returns -EFBIG on error so it also won't happen in real life. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c index bbe2c68c18a6..83d3f08a37b2 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c @@ -365,8 +365,8 @@ static int __proc_cpt_table(void *data, int write, if (rc >= 0) break; - LIBCFS_FREE(buf, len); if (rc == -EFBIG) { + LIBCFS_FREE(buf, len); len <<= 1; continue; } -- 2.39.5