Otherwise we have a memory leak and so fail the Google oss-fuzz check_build test.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov 18 21:02:52 UTC 2019 on sn-devel-184
int LLVMFuzzerTestOneInput(uint8_t *buf, size_t len)
{
FILE *fp = NULL;
+ struct tiniparser_dictionary *d = NULL;
if (len == 0) {
/*
fp = fmemopen(buf, len, "r");
- tiniparser_load_stream(fp);
+ d = tiniparser_load_stream(fp);
+ if (d != NULL) {
+ tiniparser_freedict(d);
+ }
fclose(fp);