Commit 9c367e53 authored by Yinghai Lu's avatar Yinghai Lu Committed by Greg Kroah-Hartman

nfs: Fix nfs_parse_mount_options() kfree() leak

commit 4223a4a1 upstream.

Fix a (small) memory leak in one of the error paths of the NFS mount
options parsing code.

Regression introduced in 2.6.30 by commit a67d18f8 (NFS: load the
rpc/rdma transport module automatically).
Reported-by: default avatarYinghai Lu <yinghai@kernel.org>
Reported-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 76132171
...@@ -1323,6 +1323,7 @@ static int nfs_parse_mount_options(char *raw, ...@@ -1323,6 +1323,7 @@ static int nfs_parse_mount_options(char *raw,
default: default:
dfprintk(MOUNT, "NFS: unrecognized " dfprintk(MOUNT, "NFS: unrecognized "
"transport protocol\n"); "transport protocol\n");
kfree(string);
return 0; return 0;
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment