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:	Mon, 03 Oct 2011 17:23:53 +0200
From:	Thomas Jarosch <thomas.jarosch@...ra2net.com>
To:	netdev@...r.kernel.org
Subject: [iproute2 PATCH 07/11] Fix file descriptor leak on error in iproute_flush_cache()

Detected by cppcheck.

Signed-off-by: Thomas Jarosch <thomas.jarosch@...ra2net.com>
---
 ip/iproute.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ip/iproute.c b/ip/iproute.c
index 21e1a4b..15b36e8 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -1057,6 +1057,7 @@ static int iproute_flush_cache(void)
 
 	if ((write (flush_fd, (void *)buffer, len)) < len) {
 		fprintf (stderr, "Cannot flush routing cache\n");
+		close(flush_fd);
 		return -1;
 	}
 	close(flush_fd);
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" 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