Fix file descriptor leak on error in iproute_flush_cache()
Detected by cppcheck. Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
This commit is contained in:
parent
e9a927dc08
commit
25352af7c2
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue