summaryrefslogtreecommitdiffstats
path: root/pimd/pim_sock.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-02-02 02:44:21 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-02-02 02:44:21 +0100
commit540263204c64431399662556c9f40aaccf73aba0 (patch)
treec0b9804a902e6ae648265ba8e5188fcc85b23024 /pimd/pim_sock.c
parentpimd: Fix cmd issues (diff)
downloadfrr-540263204c64431399662556c9f40aaccf73aba0.tar.xz
frr-540263204c64431399662556c9f40aaccf73aba0.zip
pimd: Fix fd leak
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_sock.c')
-rw-r--r--pimd/pim_sock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c
index 11cd61b59..df0095d29 100644
--- a/pimd/pim_sock.c
+++ b/pimd/pim_sock.c
@@ -139,6 +139,7 @@ int pim_socket_mcast(int protocol, struct in_addr ifaddr, int ifindex, u_char lo
ret = pim_socket_bind (fd, ifp);
if (ret)
{
+ close (fd);
zlog_warn("Could not set fd: %d for interface: %s to device",
fd, ifp->name);
return PIM_SOCK_ERR_BIND;