Commit 25352af7 authored by Thomas Jarosch's avatar Thomas Jarosch Committed by Stephen Hemminger

Fix file descriptor leak on error in iproute_flush_cache()

Detected by cppcheck.
Signed-off-by: default avatarThomas Jarosch <thomas.jarosch@intra2net.com>
parent e9a927dc
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment