now wiht 90% less leaks

This commit is contained in:
Dominik Maier
2020-03-09 21:34:11 +01:00
parent 416020daef
commit 1136e887bd
8 changed files with 64 additions and 91 deletions

View File

@ -224,7 +224,7 @@ static int stricmp(char const* a, char const* b) {
/* Main entry point */
int main(int argc, char** argv, char** envp) {
int main(int argc, char** argv_orig, char** envp) {
s32 opt;
u64 prev_queued = 0;
@ -237,6 +237,8 @@ int main(int argc, char** argv, char** envp) {
struct timeval tv;
struct timezone tz;
char **argv = argv_cpy_dup(argc, argv_orig);
afl_state_t* afl = calloc(1, sizeof(afl_state_t));
if (!afl) { FATAL("Could not create afl state"); }
@ -1173,6 +1175,8 @@ stop_fuzzing:
ck_free(afl->sync_id);
ck_free(afl);
argv_cpy_free(argv);
alloc_report();
OKF("We're done here. Have a nice day!\n");