aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-09-27 11:28:58 +0200
committerlaforge <laforge@osmocom.org>2020-09-29 16:58:22 +0000
commite4d9a2c5eb78f4188becb2dafb57b14e88e26fa1 (patch)
treef04c4049191f80b143820a958c9de327e965cfcd
parentc433889bba6f3886411b8b0ef9d7318c4c8444b3 (diff)
logging_vty: set osmo_stderr_target to NULL on "no log stderr"
We cannot keep a reference to the old log_target around if we just destroyed/deleted it. Change-Id: I98a801cf83347a4422534d020d5ed5e2d1eb5482
-rw-r--r--src/vty/logging_vty.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index 0e1782a4..bd513e30 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -33,6 +33,7 @@
#include <osmocom/core/strrb.h>
#include <osmocom/core/loggingrb.h>
#include <osmocom/core/gsmtap.h>
+#include <osmocom/core/application.h>
#include <osmocom/vty/command.h>
#include <osmocom/vty/buffer.h>
@@ -797,6 +798,7 @@ DEFUN(cfg_no_log_stderr, cfg_no_log_stderr_cmd,
}
log_target_destroy(tgt);
+ osmo_stderr_target = NULL;
RET_WITH_UNLOCK(CMD_SUCCESS);
}