From 3017a977f7dd47d1fed4909b8786f6946da11f97 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 13 Jul 2017 13:59:40 +0200 Subject: [PATCH] VIRT-PHY: mcast_sock: We must close the fd before setting it to -1 Change-Id: Id8e72c8800a8b3021ab350acaebd912f1b387063 --- src/host/virt_phy/src/shared/osmo_mcast_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/host/virt_phy/src/shared/osmo_mcast_sock.c b/src/host/virt_phy/src/shared/osmo_mcast_sock.c index b42a5e46..6ef3969b 100644 --- a/src/host/virt_phy/src/shared/osmo_mcast_sock.c +++ b/src/host/virt_phy/src/shared/osmo_mcast_sock.c @@ -138,9 +138,9 @@ void mcast_client_sock_close(struct mcast_client_sock *client_sock) /* multicast memberships of socket are implicitly dropped when * socket is closed */ osmo_fd_unregister(&client_sock->osmo_fd); + close(client_sock->osmo_fd.fd); client_sock->osmo_fd.fd = -1; client_sock->osmo_fd.when = 0; - close(client_sock->osmo_fd.fd); talloc_free(client_sock); } -- 2.11.4.GIT