lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 24 Nov 2010 12:46:38 +0100
From:	Lukas Czerner <lczerner@...hat.com>
To:	tytso@....edu
Cc:	linux-ext4@...r.kernel.org, lczerner@...hat.com
Subject: [PATCH] e2fsprogs: fix possible mem-leak in ext2fs_free_generic_bmap()

ext2fs_free_generic_bmap is supposed to free the ext2fs_generic_bitmap
structure, however it frees just the memory allocated to the members of
the structure but not the memory allocated for the structure itself.
This commit fixes it with simple oneliner by adding free() at the end of
the ext2fs_free_generic_bmap().

Signed-off-by: Lukas Czerner <lczerner@...hat.com>
---
 lib/ext2fs/gen_bitmap64.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c
index 9f23b92..f46f048 100644
--- a/lib/ext2fs/gen_bitmap64.c
+++ b/lib/ext2fs/gen_bitmap64.c
@@ -158,6 +158,7 @@ void ext2fs_free_generic_bmap(ext2fs_generic_bitmap bmap)
 		bmap->description = 0;
 	}
 	bmap->magic = 0;
+	free(bmap);
 }
 
 errcode_t ext2fs_copy_generic_bmap(ext2fs_generic_bitmap src,
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ