mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 08:48:28 +00:00
pimd: When bind fails we could leave an open socket
Clean up the rare situation when bind fails to not close the fd that was just opened and have the socket leaked. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
d12f46fa1a
commit
2c85fdd4c3
@ -1013,6 +1013,8 @@ struct igmp_sock *pim_igmp_sock_add(struct list *igmp_sock_list,
|
||||
if (bind(fd, (struct sockaddr *) &sin, sizeof(sin)) != 0) {
|
||||
zlog_warn("Could not bind IGMP socket for %s on %s",
|
||||
inet_ntoa(ifaddr), ifp->name);
|
||||
close(fd);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user