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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251118132601.2756185-3-wuguanghao3@huawei.com>
Date: Tue, 18 Nov 2025 21:26:01 +0800
From: Wu Guanghao <wuguanghao3@...wei.com>
To: <tytso@....edu>
CC: <adilger.kernel@...ger.ca>, <linux-ext4@...r.kernel.org>,
	<yangyun50@...wei.com>, <wuguanghao3@...wei.com>
Subject: [PATCH 2/2] resize: fix memory leak when exiting normally

The main() function only releases fs when it exits through the errout or
success_exit labels. When completes normally, it does not release fs.

Signed-off-by: Wu Guanghao <wuguanghao3@...wei.com>
---
 resize/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/resize/main.c b/resize/main.c
index 08a4bbaf..71711229 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -702,6 +702,8 @@ int main (int argc, char ** argv)
 	}
 	if (fd > 0)
 		close(fd);
+
+	(void) ext2fs_close_free(&fs);
 	remove_error_table(&et_ext2_error_table);
 	return 0;
 errout:
-- 
2.27.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ