mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 07:23:41 +00:00
pimd: Fix leaked fd
When caling pim_sock_open if the failure cause happens, however unlikely, don't leak the fd on failure. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
f0646db01d
commit
2cd32c6114
@ -371,6 +371,7 @@ static int pim_sock_open(struct in_addr ifaddr, int ifindex)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (pim_socket_join(fd, qpim_all_pim_routers_addr, ifaddr, ifindex)) {
|
if (pim_socket_join(fd, qpim_all_pim_routers_addr, ifaddr, ifindex)) {
|
||||||
|
close(fd);
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user