diff options
Diffstat (limited to 'lib/memdebug.c')
-rw-r--r-- | lib/memdebug.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/memdebug.c b/lib/memdebug.c index 2b8808ab0..16434f819 100644 --- a/lib/memdebug.c +++ b/lib/memdebug.c @@ -115,7 +115,8 @@ void curl_memdebug(const char *logname) logfile = stderr; #ifdef MEMDEBUG_LOG_SYNC /* Flush the log file after every line so the log isn't lost in a crash */ - setbuf(logfile, (char *)NULL); + if(logfile) + setbuf(logfile, (char *)NULL); #endif } } |