pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/41701?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
---
M src/core/gsmtap_util.c
1 file changed, 6 insertions(+), 5 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  daniel: Looks good to me, but someone else must approve




diff --git a/src/core/gsmtap_util.c b/src/core/gsmtap_util.c
index d6a9752..f1a2abf 100644
--- a/src/core/gsmtap_util.c
+++ b/src/core/gsmtap_util.c
@@ -514,14 +514,15 @@
        if (!gti)
                return;

-       if (gti->osmo_io_mode) {
+       if (gti->osmo_io_mode)
                osmo_iofd_free(gti->out);
+       else
+               close(gti->source_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/+/41701?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I55fd51066d22261cf89fbf9501bec3af743a641d
Gerrit-Change-Number: 41701
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to