in debugf(), don't call fflush() on a null pointer. Xref: https://trac.transmissionbt.com/ticket/4531#comment:73

This commit is contained in:
Jordan Lee 2014-01-19 04:26:45 +00:00
parent fa23e1e60a
commit 13a09c5bf6
1 changed files with 3 additions and 2 deletions

View File

@ -326,10 +326,11 @@ debugf(const char *format, ...)
{
va_list args;
va_start(args, format);
if(dht_debug)
if(dht_debug) {
vfprintf(dht_debug, format, args);
fflush(dht_debug);
}
va_end(args);
fflush(dht_debug);
}
static void