diff options
Diffstat (limited to 'src/afl-common.c')
-rw-r--r-- | src/afl-common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/afl-common.c b/src/afl-common.c index ffc32533..c9f09d38 100644 --- a/src/afl-common.c +++ b/src/afl-common.c @@ -374,9 +374,13 @@ u8 *find_binary(u8 *fname) { target_path = ck_strdup(fname); if (stat(target_path, &st) || !S_ISREG(st.st_mode) || - !(st.st_mode & 0111) || st.st_size < 4) + !(st.st_mode & 0111) || st.st_size < 4) { + + free(target_path); FATAL("Program '%s' not found or not executable", fname); + } + } else { while (env_path) { |