Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f13a568e authored by Joseph Qi's avatar Joseph Qi Committed by Linus Torvalds
Browse files

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: default avatarJoseph Qi <joseph.qi@huawei.com>
Reviewed-by: default avatarjoyce.xue <xuejiufei@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 005f8005
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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));
}