pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/41707?usp=email )


Change subject: gsmtap_util: Fix fds not closed in ofd_wq_mode=0
......................................................................

gsmtap_util: Fix fds not closed in ofd_wq_mode=0

Change-Id: I55fd51066d22261cf89fbf9501bec3af743a641d
(cherry picked from commit 16bf95ea21d7c8db6d07aaf5d161bf5a1d9d7915)
---
M src/core/gsmtap_util.c
1 file changed, 6 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/07/41707/1

diff --git a/src/core/gsmtap_util.c b/src/core/gsmtap_util.c
index 62d3ffa..35bbf77 100644
--- a/src/core/gsmtap_util.c
+++ b/src/core/gsmtap_util.c
@@ -529,14 +529,15 @@
        if (!gti)
                return;

-       if (gti->osmo_io_mode) {
+       if (gti->osmo_io_mode)
                osmo_iofd_free(gti->out);
+       else
+               close(gti->wq.bfd.fd);

-               if (gti->sink_fd != -1) {
-                       close(gti->sink_fd);
-                       gti->sink_fd = -1;
-               }

+       if (gti->sink_fd != -1) {
+               close(gti->sink_fd);
+               gti->sink_fd = -1;
        }

        talloc_free(gti);

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41707?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: pespin/rel-1.12.0
Gerrit-Change-Id: I55fd51066d22261cf89fbf9501bec3af743a641d
Gerrit-Change-Number: 41707
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to