From: Joseph Qi Date: Thu, 25 Sep 2014 23:05:11 +0000 (-0700) Subject: ocfs2: free vol_label in ocfs2_delete_osb() X-Git-Tag: v3.17-rc7~9^2~8 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=f13a568e5a787f3980f3bd00ba9dd0b78a734129;p=cascardo%2Flinux.git ocfs2: free vol_label in ocfs2_delete_osb() osb->vol_label is malloced in ocfs2_initialize_super but not freed if error occurs or during umount, thus causing a memory leak. Signed-off-by: Joseph Qi Reviewed-by: joyce.xue Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index ddb662b32447..4142546aedae 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -2532,6 +2532,7 @@ static void ocfs2_delete_osb(struct ocfs2_super *osb) kfree(osb->journal); kfree(osb->local_alloc_copy); kfree(osb->uuid_str); + kfree(osb->vol_label); ocfs2_put_dlm_debug(osb->osb_dlm_debug); memset(osb, 0, sizeof(struct ocfs2_super)); }