mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-23 21:49:46 +00:00
Avoids memory leak with fuzz driver (#1233)
This commit is contained in:
parent
71b32ce5e7
commit
26aae877dc
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user