[Debian-ha-commits] [ocfs2-tools] 18/58: o2image: fix a memory leak problem in ocfs2_image_free_bitmap()

Valentin Vidic vvidic-guest at moszumanska.debian.org
Tue Jun 20 13:40:41 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 494ff04be8cb77c5d0f354d24ae7a27584f8d194
Author: piaojun <piaojun at huawei.com>
Date:   Sat Jul 30 16:33:13 2016 +0800

    o2image: fix a memory leak problem in ocfs2_image_free_bitmap()
    
    whether OCFS2_FLAG_IMAGE_FILE is set or not, we will allocate image
    bitmaps by ocfs2_image_alloc_bitmap(), so we should free them in
    ocfs2_image_free_bitmap() anyway.
    
    Signed-off-by: Jun Piao <piaojun at huawei.com>
    Reviewed-by: Joseph Qi <joseph.qi at huawei.com>
---
 libocfs2/image.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/libocfs2/image.c b/libocfs2/image.c
index 41d1a53..fe95530 100644
--- a/libocfs2/image.c
+++ b/libocfs2/image.c
@@ -66,10 +66,6 @@ errcode_t ocfs2_image_free_bitmap(ocfs2_filesys *ofs)
 	struct ocfs2_image_state *ost = ofs->ost;
 	int i;
 
-	/* image bitmaps are allocated only for ocfs2 image image files */
-	if (!(ofs->fs_flags & OCFS2_FLAG_IMAGE_FILE))
-		return 0;
-
 	if (!ost->ost_bmparr)
 		return 0;
 

-- 
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