Skip to content

Commit

Permalink
nfsd: Fix memleak in svc_export_put
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
majianpeng authored and J. Bruce Fields committed Jan 29, 2013
1 parent ff89be8 commit 885c91f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfsd/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 885c91f

Please sign in to comment.