diff options
author | 2023-03-09 17:50:38 +0100 | |
---|---|---|
committer | 2023-03-10 13:41:17 +0000 | |
commit | 040548f790cdef7d65aae1a896baf2ce989c183d (patch) | |
tree | 8cf34e2b38694deda8af487c9b5d9fd2dca4236f | |
parent | cosmetic: stats_tcp: Fix typo in comment (diff) | |
download | libosmocore-040548f790cdef7d65aae1a896baf2ce989c183d.tar.xz libosmocore-040548f790cdef7d65aae1a896baf2ce989c183d.zip |
logging: Unregister osmo_fd before closing fd
Change-Id: I0754ac3110b63d2a380068010830af6c85b0a653
-rw-r--r-- | src/core/logging.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/logging.c b/src/core/logging.c index 938c65f2..bcfe3185 100644 --- a/src/core/logging.c +++ b/src/core/logging.c @@ -1327,12 +1327,12 @@ void log_target_destroy(struct log_target *target) } 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; |