diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-10-16 10:56:25 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-29 16:25:23 +0800 |
commit | 92a1daba3a11c027e491c4850dc35163f4a142b1 (patch) | |
tree | 8d7b6a5fd9bf364271df691613ca9f2c951e896c | |
parent | staging: lustre: lustre: ptlrpc: sec.c: Replacing strncat with strlcat to avoid overwrite size (diff) | |
download | linux-dev-92a1daba3a11c027e491c4850dc35163f4a142b1.tar.xz linux-dev-92a1daba3a11c027e491c4850dc35163f4a142b1.zip |
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 <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/lustre/lustre/libcfs/linux/linux-proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |