Use va_end in functions with a variable number of arguments.

pull/2/head
Markus Böhme 2017-03-14 14:12:15 +01:00
parent 99e568f55b
commit 18249a7f82
1 changed files with 2 additions and 0 deletions

View File

@ -75,6 +75,7 @@ fatal(const char *fmt, ...)
fclose(cleanup[i].file);
remove(cleanup[i].name);
}
va_end(ap);
exit(EXIT_FAILURE);
}
@ -89,6 +90,7 @@ warning(const char *fmt, ...)
fprintf(stderr, "warning: ");
vfprintf(stderr, fmt, ap);
fputc('\n', stderr);
va_end(ap);
}
#if ENCHIVE_OPTION_AGENT