From: Yinghai Lu Date: Tue, 20 Oct 2009 05:13:46 +0000 (+0900) Subject: nfs: Fix nfs_parse_mount_options() kfree() leak X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4223a4a155f245d41c350ed9eba4fc32e965c4da;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reported-by: Pekka Enberg Signed-off-by: Ingo Molnar Signed-off-by: Trond Myklebust Cc: stable@kernel.org Signed-off-by: Linus Torvalds --- 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;