avformat/movenc-test: correct varargs usage
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Fri, 4 Dec 2015 06:03:26 +0000 (01:03 -0500)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Sun, 6 Dec 2015 13:11:47 +0000 (08:11 -0500)
It is required to call va_end for each invocation of va_start within the
same function.

Fixes: CID 1341583.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavformat/movenc-test.c

index d494e41..957ae69 100644 (file)
@@ -137,6 +137,7 @@ static void check_func(int value, int line, const char *msg, ...)
         vprintf(msg, ap);
         printf("\n");
         check_faults++;
+        va_end(ap);
     }
 }
 #define check(value, ...) check_func(value, __LINE__, __VA_ARGS__)