mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
memdebug: don't setbuf() if the file open failed
Bug: https://github.com/curl/curl/issues/828#issuecomment-313475151
This commit is contained in:
parent
2d86e8d128
commit
0cec0f4615
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user