]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Fix: Add va_end() before return
authorJaroslav Rohel <jrohel@redhat.com>
Tue, 11 Dec 2018 08:50:06 +0000 (09:50 +0100)
committerJaroslav Rohel <jrohel@redhat.com>
Tue, 11 Dec 2018 12:26:03 +0000 (13:26 +0100)
The va_end() performs cleanup.
If va_end() is not called before a function that calls va_start() returns,
the behavior is undefined.

src/pool.c

index 383edb2abffd7803cd7714cf080c5b3cac1352cd..be6a4193baa6a1a7ef5193216c3dc820b523ef94 100644 (file)
@@ -1536,6 +1536,7 @@ pool_debug(Pool *pool, int type, const char *format, ...)
         vprintf(format, args);
       else
         vfprintf(stderr, format, args);
+      va_end(args);
       return;
     }
   vsnprintf(buf, sizeof(buf), format, args);