From 13a09c5bf62d9253f560567c52548e7041f13408 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sun, 19 Jan 2014 04:26:45 +0000 Subject: [PATCH] in debugf(), don't call fflush() on a null pointer. Xref: https://trac.transmissionbt.com/ticket/4531#comment:73 --- third-party/dht/dht.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/third-party/dht/dht.c b/third-party/dht/dht.c index 37d48ba0f..fa7a959c1 100644 --- a/third-party/dht/dht.c +++ b/third-party/dht/dht.c @@ -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 -- 2.40.0