r26387: Merge logfile segfault into alpha2 branch.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 10 Dec 2007 23:23:08 +0000 (00:23 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Dec 2007 04:59:59 +0000 (05:59 +0100)
Andrew Bartlett
(This used to be commit a6d1477ab97c5b93fad5502868bf324c31c75aa5)

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);