about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2021-06-23 23:35:32 +0200
committerhexcoder- <heiko@hexco.de>2021-06-23 23:35:32 +0200
commitae50a5067769e2ee4af997c8527de84cf3fdae19 (patch)
treec49471f5a1c6ba1c9b6452a1a27fa63355926672 /src
parentd64cde8370dc6299b9280feaa575a4266163788f (diff)
downloadafl++-ae50a5067769e2ee4af997c8527de84cf3fdae19.tar.gz
fix afl-showmap
Diffstat (limited to 'src')
-rw-r--r--src/afl-showmap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/afl-showmap.c b/src/afl-showmap.c
index 646396ad..936d3bc4 100644
--- a/src/afl-showmap.c
+++ b/src/afl-showmap.c
@@ -740,10 +740,9 @@ u32 execute_testcases(u8 *dir) {
 
     }
 
-    free(nl[i]);
-
     if (!S_ISREG(st.st_mode) || !st.st_size) {
 
+      free(nl[i]);
       ck_free(fn2);
       continue;
 
@@ -760,6 +759,8 @@ u32 execute_testcases(u8 *dir) {
     if (!collect_coverage)
       snprintf(outfile, sizeof(outfile), "%s/%s", out_file, nl[i]->d_name);
 
+    free(nl[i]);
+
     if (read_file(fn2)) {
 
       if (wait_for_gdb) {