summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/super.c
diff options
context:
space:
mode:
authorJoseph Qi <joseph.qi@huawei.com>2014-09-25 16:05:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-26 08:10:34 -0700
commitf13a568e5a787f3980f3bd00ba9dd0b78a734129 (patch)
treef3d242b4397a3103d8e01cb26dbf59aafe8d86c4 /fs/ocfs2/super.c
parent005f800508eb391480f463dad3d54e5b4ec67d57 (diff)
downloadop-kernel-dev-f13a568e5a787f3980f3bd00ba9dd0b78a734129.zip
op-kernel-dev-f13a568e5a787f3980f3bd00ba9dd0b78a734129.tar.gz
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>
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r--fs/ocfs2/super.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index ddb662b..4142546 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));
}
OpenPOWER on IntegriCloud