This corrects several places in ccan where stdarg.h is used but there is a missing va_end(). You can get away with this on many platforms, but not all. Caught by Coverity scan. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
@@ -1085,8 +1085,8 @@ int failtest_open(const char *pathname,
call.closed = false;
if (call.flags & O_CREAT) {
call.mode = va_arg(ap, int);
- va_end(ap);
}
+ va_end(ap);
p = add_history(FAILTEST_OPEN, true, file, line, &call);
/* Avoid memory leak! */
if (p == &unrecorded_call)
@@ -357,6 +357,7 @@ enum line_compiled get_ccan_line_pp(struct pp_conditions *cond,
ret = get_pp(cond, head);
tal_free(head);
return ret;
@@ -27,6 +27,7 @@ bool run_gcov(const void *ctx, unsigned int *time_ms, char **output,
args = tal_vfmt(ctx, fmt, ap);
rc = run_command(ctx, time_ms, output, "%s %s", cmd, args);
tal_free(args);
return rc;