mirror of
https://github.com/curl/curl.git
synced 2026-05-30 04:27:30 +03: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
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue