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-next>] [day] [month] [year] [list]
Date:   Sun, 19 Feb 2017 11:19:49 +0530
From:   Saurabh Badhwar <sbsaurabhbadhwar9@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org
Subject: [PATCH] tools/vm: Fix possible resource leak in page_owner_sort.c

Fix possible resource leak in tools/vm/page_owner_sort.c
Signed-off-by: Saurabh Badhwar <sbsaurabhbadhwar9@...il.com>
---
 tools/vm/page_owner_sort.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/vm/page_owner_sort.c b/tools/vm/page_owner_sort.c
index f1c055f..8346261 100644
--- a/tools/vm/page_owner_sort.c
+++ b/tools/vm/page_owner_sort.c
@@ -110,6 +110,8 @@ int main(int argc, char **argv)
 	buf = malloc(BUF_SIZE);
 	if (!list || !buf) {
 		printf("Out of memory\n");
+		fclose(fin);
+		fclose(fout);
 		exit(1);
 	}
 
@@ -144,6 +146,7 @@ int main(int argc, char **argv)
 
 	for (i = 0; i < count; i++)
 		fprintf(fout, "%d times:\n%s\n", list2[i].num, list2[i].txt);
-
+		
+	fclose(fout);
 	return 0;
 }
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ