Skip to content

Commit 850ffa0

Browse files
DavidKorczynskiedsiper
authored andcommitted
parser: free allocated types
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=45973 Signed-off-by: David Korczynski <[email protected]>
1 parent 3ff332a commit 850ffa0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/flb_parser.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,14 @@ static int parser_conf_file(const char *cfg, struct flb_cf *cf,
604604
if (types_str) {
605605
flb_sds_destroy(types_str);
606606
}
607+
if (types_len) {
608+
for (int i=0; i<types_len; i++){
609+
if (types[i].key != NULL) {
610+
flb_free(types[i].key);
611+
}
612+
}
613+
flb_free(types);
614+
}
607615
if (decoders) {
608616
flb_parser_decoder_list_destroy(decoders);
609617
}

0 commit comments

Comments
 (0)