Skip to content

Commit

Permalink
nfs: Fix nfs_parse_mount_options() kfree() leak
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Yinghai Lu authored and torvalds committed Oct 21, 2009
1 parent ad39602 commit 4223a4a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4223a4a

Please sign in to comment.