pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/31804 )

Change subject: logging: Unregister osmo_fd before closing fd
......................................................................

logging: Unregister osmo_fd before closing fd

Change-Id: I0754ac3110b63d2a380068010830af6c85b0a653
---
M src/core/logging.c
1 file changed, 10 insertions(+), 1 deletion(-)

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




diff --git a/src/core/logging.c b/src/core/logging.c
index 938c65f..bcfe318 100644
--- a/src/core/logging.c
+++ b/src/core/logging.c
@@ -1327,12 +1327,12 @@
                }
                wq = target->tgt_file.wqueue;
                if (wq) {
+                       osmo_fd_unregister(&wq->bfd);
                        if (wq->bfd.fd >= 0) {
                                if (target->type == LOG_TGT_TYPE_FILE)
                                        close(wq->bfd.fd);
                                wq->bfd.fd = -1;
                        }
-                       osmo_fd_unregister(&wq->bfd);
                        osmo_wqueue_clear(wq);
                        talloc_free(wq);
                        target->tgt_file.wqueue = NULL;

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31804
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0754ac3110b63d2a380068010830af6c85b0a653
Gerrit-Change-Number: 31804
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to