Skip to content

Commit

Permalink
lib: add missing va_end() on exceptions
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <eduardo@treasure-data.com>
  • Loading branch information
edsiper committed Dec 24, 2019
1 parent b0191b6 commit b7c8d9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/flb_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit b7c8d9e

Please sign in to comment.