Harald Welte has submitted this change and it was merged.

Change subject: VIRT-PHY: mcast_sock: We must close the fd before setting it to 
-1
......................................................................


VIRT-PHY: mcast_sock: We must close the fd before setting it to -1

Change-Id: Id8e72c8800a8b3021ab350acaebd912f1b387063
---
M src/host/virt_phy/src/shared/osmo_mcast_sock.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



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 b42a5e4..6ef3969 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 @@
        /* 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);
 
 }

-- 
To view, visit https://gerrit.osmocom.org/3234
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8e72c8800a8b3021ab350acaebd912f1b387063
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to