From: Ferry Huberts Date: Fri, 6 Nov 2015 14:22:10 +0000 (+0100) Subject: olsr_exit: protect against a NULL message X-Git-Tag: v0.9.5~741 X-Git-Url: http://olsr.org/git/?p=olsrd.git;a=commitdiff_plain;h=cf42349f9f1518bf1f5b5581e503e33bbe1f8517;ds=inline olsr_exit: protect against a NULL message Signed-off-by: Ferry Huberts --- diff --git a/src/olsr.c b/src/olsr.c index 9c370430..a5eb06e5 100644 --- a/src/olsr.c +++ b/src/olsr.c @@ -558,8 +558,10 @@ olsr_status_to_string(uint8_t status) void olsr_exit(const char *msg, int val) { - OLSR_PRINTF(1, "OLSR EXIT: %s\n", msg); - olsr_syslog(OLSR_LOG_ERR, "olsrd exit: %s\n", msg); + if (msg) { + OLSR_PRINTF(1, "OLSR EXIT: %s\n", msg); + olsr_syslog(OLSR_LOG_ERR, "olsrd exit: %s\n", msg); + } fflush(stdout); if (olsr_cnf) {