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 <joseph.qi@huawei.com> Reviewed-by: joyce.xue <xuejiufei@huawei.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Родитель
005f800508
Коммит
f13a568e5a
|
@ -2532,6 +2532,7 @@ static void ocfs2_delete_osb(struct ocfs2_super *osb)
|
||||||
kfree(osb->journal);
|
kfree(osb->journal);
|
||||||
kfree(osb->local_alloc_copy);
|
kfree(osb->local_alloc_copy);
|
||||||
kfree(osb->uuid_str);
|
kfree(osb->uuid_str);
|
||||||
|
kfree(osb->vol_label);
|
||||||
ocfs2_put_dlm_debug(osb->osb_dlm_debug);
|
ocfs2_put_dlm_debug(osb->osb_dlm_debug);
|
||||||
memset(osb, 0, sizeof(struct ocfs2_super));
|
memset(osb, 0, sizeof(struct ocfs2_super));
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче