projects
/
curl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d86e8d
)
memdebug: don't setbuf() if the file open failed
author
Gisle Vanem
<gisle.vanem@gmail.com>
Thu, 6 Jul 2017 21:14:29 +0000
(23:14 +0200)
committer
Daniel Stenberg
<daniel@haxx.se>
Thu, 6 Jul 2017 21:15:00 +0000
(23:15 +0200)
Bug: https://github.com/curl/curl/issues/828#issuecomment-
313475151
lib/memdebug.c
patch
|
blob
|
history
diff --git
a/lib/memdebug.c
b/lib/memdebug.c
index 2b8808ab03e1f4b0b9e9d16e736b742562e1c063..16434f819ecc5ef2954fb91c7484a7d4a573a5f4 100644
(file)
--- 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
}
}