[Debian-ha-commits] [ocfs2-tools] 47/58: tunefs.ocfs2: fix double free bug
Valentin Vidic
vvidic-guest at moszumanska.debian.org
Tue Jun 20 13:40:44 UTC 2017
This is an automated email from the git hooks/post-receive script.
vvidic-guest pushed a commit to branch upstream
in repository ocfs2-tools.
commit 8c7a3b505f1f2fac8d926d975fdd0f4efcbaef1a
Author: Junxiao Bi <junxiao.bi at oracle.com>
Date: Fri Oct 28 15:25:27 2016 +0800
tunefs.ocfs2: fix double free bug
Although it will set cinode to NULL in ocfs2_free, it won't affect the
outer ci in tunefs_journal_check, so we have to set ci to NULL
explicitly here.
Fixes: 79ec217ccd03("tunefs.ocfs2: fix memory leak problems in tunefs_journal_check() and parse_options()")
Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>
Reviewed-by: Joseph Qi <joseph.qi at huawei.com>
Reviewed-by: Jun Piao <piaojun at huawei.com>
---
tunefs.ocfs2/libocfs2ne.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tunefs.ocfs2/libocfs2ne.c b/tunefs.ocfs2/libocfs2ne.c
index 20bee9f..240c1d9 100644
--- a/tunefs.ocfs2/libocfs2ne.c
+++ b/tunefs.ocfs2/libocfs2ne.c
@@ -1795,6 +1795,7 @@ static errcode_t tunefs_journal_check(ocfs2_filesys *fs)
state->ts_journal_features.opt_incompat |=
jsb->s_feature_incompat;
ocfs2_free_cached_inode(fs, ci);
+ ci = NULL;
}
/*
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/ocfs2-tools.git
More information about the Debian-HA-Commits
mailing list