From b7c8d9e1ee04591538001a590324b532bf501bc4 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Tue, 24 Dec 2019 12:34:14 -0600 Subject: [PATCH] lib: add missing va_end() on exceptions Signed-off-by: Eduardo Silva --- src/flb_lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/flb_lib.c b/src/flb_lib.c index 8174ddb3967..98f7844abb7 100644 --- a/src/flb_lib.c +++ b/src/flb_lib.c @@ -261,6 +261,7 @@ int flb_input_set(flb_ctx_t *ctx, int ffd, ...) value = va_arg(va, char *); if (!value) { /* Wrong parameter */ + va_end(va); return -1; } ret = flb_input_set_property(i_ins, key, value); @@ -285,7 +286,6 @@ int flb_output_set(flb_ctx_t *ctx, int ffd, ...) o_ins = out_instance_get(ctx, ffd); if (!o_ins) { - printf("no instance ofund!\n"); return -1; } @@ -294,6 +294,7 @@ int flb_output_set(flb_ctx_t *ctx, int ffd, ...) value = va_arg(va, char *); if (!value) { /* Wrong parameter */ + va_end(va); return -1; } @@ -327,6 +328,7 @@ int flb_filter_set(flb_ctx_t *ctx, int ffd, ...) value = va_arg(va, char *); if (!value) { /* Wrong parameter */ + va_end(va); return -1; }