]> 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)
committerMichael Schroeder <mls@suse.de>
Thu, 27 Jun 2019 14:19:04 +0000 (16:19 +0200)
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 60cc0f49c7dbfc7da8edb1c44e996ce55c3cc117..f03b43f9e9dd0add8dfb850a86d2da9d1d2bf8aa 100644 (file)
@@ -1505,6 +1505,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);