Skip to content

Commit

Permalink
ceph: fix memory leak
Browse files Browse the repository at this point in the history
kfree does not clean up indirect allocations in
ceph_fs_client and ceph_options (e.g. snapdir_name).

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Noah Watkins authored and Sage Weil committed Aug 22, 2011
1 parent 795858d commit 259a187
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ceph/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -813,8 +813,8 @@ static struct dentry *ceph_mount(struct file_system_type *fs_type,
fsc = create_fs_client(fsopt, opt);
if (IS_ERR(fsc)) {
res = ERR_CAST(fsc);
kfree(fsopt);
kfree(opt);
destroy_mount_options(fsopt);
ceph_destroy_options(opt);
goto out_final;
}

Expand Down

0 comments on commit 259a187

Please sign in to comment.