r26386: We need to test in more than just 'interactive' mode...
authorAndrew Bartlett <abartlet@samba.org>
Mon, 10 Dec 2007 23:22:05 +0000 (00:22 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:49:20 +0000 (05:49 +0100)
Fix segfault found when running smbd without options.

Andrew Bartlett
(This used to be commit 880dfeadae41be5f0140ac07afb8680fc11f6ebf)

source4/lib/util/debug.c

index 070cdee7d54f5da08298be783cf08acdcd4cb4e3..5c1abf5039cdae741547abccf190558905f7f90a 100644 (file)
@@ -137,7 +137,7 @@ _PUBLIC_ void reopen_logs(void)
                break;
 
        case DEBUG_FILE:
-               if ((*logfile) == '/') {
+               if (logfile && (*logfile) == '/') {
                        fname = strdup(logfile);
                } else {
                        asprintf(&fname, "%s/%s.log", dyn_LOGFILEBASE, state.prog_name);