aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYinghai Lu <[email protected]>2009-10-20 14:13:46 +0900
committerLinus Torvalds <[email protected]>2009-10-22 08:15:23 +0900
commit4223a4a155f245d41c350ed9eba4fc32e965c4da (patch)
tree521f5a2c9e3ae1e17415e93489da015b9b5b2c5d
parentad3960243e55320d74195fb85c975e0a8cc4466c (diff)
nfs: Fix nfs_parse_mount_options() kfree() leak
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 a67d18f (NFS: load the rpc/rdma transport module automatically). Reported-by: Yinghai Lu <[email protected]> Reported-by: Pekka Enberg <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Trond Myklebust <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--fs/nfs/super.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index a2c18acb8568..90be551b80c1 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1253,6 +1253,7 @@ static int nfs_parse_mount_options(char *raw,
default:
dfprintk(MOUNT, "NFS: unrecognized "
"transport protocol\n");
+ kfree(string);
return 0;
}
break;