diff options
Diffstat (limited to 'vlib/vlib/unix/mc_socket.c')
-rw-r--r-- | vlib/vlib/unix/mc_socket.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vlib/vlib/unix/mc_socket.c b/vlib/vlib/unix/mc_socket.c index 2077fd7c519..2754b302875 100644 --- a/vlib/vlib/unix/mc_socket.c +++ b/vlib/vlib/unix/mc_socket.c @@ -955,7 +955,10 @@ find_interface_ip4_address (char *if_name, u32 * ip4_address, u32 * mtu) clib_memcpy (ip4_address, &sa->sin_addr.s_addr, sizeof (ip4_address[0])); if (ioctl (fd, SIOCGIFMTU, &ifr) < 0) - return -1; + { + close (fd); + return -1; + } if (mtu) *mtu = ifr.ifr_mtu - ( /* IP4 header */ 20 + /* UDP header */ 8); |