diff --git a/src/components/utils/utils.c b/src/components/utils/utils.c index 43b61de..77f9ec8 100644 --- a/src/components/utils/utils.c +++ b/src/components/utils/utils.c @@ -100,7 +100,10 @@ int print_log(FILE *output, enum pl_type type, const char *format_message, sprintf(uf_str, uff_str, tcolor, date_preffix, format_message); va_start(args, format_message); ret = vfprintf(output, uf_str, args); + va_end(args); + va_start(args, format_message); write_into_log_file(uf_str + strlen(tcolor), args); + va_end(args); free(uf_str); va_end(args); return ret;