Avoids memory leak with fuzz driver (#1233)

This commit is contained in:
Catena cyber 2018-08-27 02:57:27 +02:00 committed by Nguyen Anh Quynh
parent 71b32ce5e7
commit 26aae877dc

View File

@ -38,11 +38,13 @@ int main(int argc, char** argv)
}
if (fread(Data, Size, 1, fp) != 1) {
fclose(fp);
free(Data);
return 2;
}
//lauch fuzzer
LLVMFuzzerTestOneInput(Data, Size);
free(Data);
fclose(fp);
return 0;
}