summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/export.c
diff options
context:
space:
mode:
authormajianpeng <majianpeng@gmail.com>2013-01-29 13:16:01 +0800
committerJ. Bruce Fields <bfields@redhat.com>2013-01-29 16:50:03 -0500
commit885c91f74662404dc179b8775494df383479311c (patch)
tree7ec009e3704fb201ab518a22954cd2951420270e /fs/nfsd/export.c
parentff89be87c70247ffe3a72271e02eb7765cdd12c4 (diff)
downloadop-kernel-dev-885c91f74662404dc179b8775494df383479311c.zip
op-kernel-dev-885c91f74662404dc179b8775494df383479311c.tar.gz
nfsd: Fix memleak in svc_export_put
In func svc_export_parse, the uuid which used kmemdup to alloc will be changed in func export_update.So the later kfree don't free this memory. And it can't be free in func svc_export_parse because other place still used.So put this operation in func svc_export_put. Signed-off-by: Jianpeng Ma <majianpeng@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r--fs/nfsd/export.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index a3946cf..45159ee 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -315,6 +315,7 @@ static void svc_export_put(struct kref *ref)
path_put(&exp->ex_path);
auth_domain_put(exp->ex_client);
nfsd4_fslocs_free(&exp->ex_fslocs);
+ kfree(exp->ex_uuid);
kfree(exp);
}
OpenPOWER on IntegriCloud