mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04: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;
|
logfile = stderr;
|
||||||
#ifdef MEMDEBUG_LOG_SYNC
|
#ifdef MEMDEBUG_LOG_SYNC
|
||||||
/* Flush the log file after every line so the log isn't lost in a crash */
|
/* 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
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user