From c44ec6c4cbc9534a3c7f5c0de9406c00305f8f52 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 12 Oct 2011 14:21:18 +0000 Subject: [PATCH] allow NULL --- src/util/common_logging.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/common_logging.c b/src/util/common_logging.c index e7818e0f4..503fb671d 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c @@ -289,7 +289,9 @@ add_definition (char *component, char *file, char *function, int from_line, n.file = strdup (file); n.strlen_file = strlen (file); } - if (strlen (function) > 0 && function[0] != '*') + if ( (NULL != function) && + (strlen (function) > 0) && + (function[0] != '*') ) n.function = strdup (function); n.from_line = from_line; n.to_line = to_line; -- 2.25.1