Commit 0cec0f46 authored by Gisle Vanem's avatar Gisle Vanem Committed by Daniel Stenberg
Browse files

memdebug: don't setbuf() if the file open failed

parent 2d86e8d1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -115,6 +115,7 @@ 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 */
    if(logfile)
      setbuf(logfile, (char *)NULL);
#endif
  }