]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
nfsd: Fix memleak in svc_export_put
authormajianpeng <majianpeng@gmail.com>
Tue, 29 Jan 2013 05:16:01 +0000 (13:16 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 29 Jan 2013 21:50:03 +0000 (16:50 -0500)
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>
fs/nfsd/export.c

index a3946cf13fc8373d6234c64d4316505364914ca3..45159ee952e689073907043cc0f43f293908c4b6 100644 (file)
@@ -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);
 }