gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 117/208: memdebug: don't setbuf() if the file open


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 117/208: memdebug: don't setbuf() if the file open failed
Date: Wed, 09 Aug 2017 17:35:14 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.55.0
in repository gnurl.

commit 0cec0f461567c152dd222982d3223dbd5e3423e7
Author: Gisle Vanem <address@hidden>
AuthorDate: Thu Jul 6 23:14:29 2017 +0200

    memdebug: don't setbuf() if the file open failed
    
    Bug: https://github.com/curl/curl/issues/828#issuecomment-313475151
---
 lib/memdebug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/memdebug.c b/lib/memdebug.c
index 2b8808ab0..16434f819 100644
--- 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
   }
 }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]