about summary refs log tree commit diff
path: root/custom_mutators/symcc
diff options
context:
space:
mode:
Diffstat (limited to 'custom_mutators/symcc')
-rw-r--r--custom_mutators/symcc/symcc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/custom_mutators/symcc/symcc.c b/custom_mutators/symcc/symcc.c
index 9c6c0cb8..a609dafb 100644
--- a/custom_mutators/symcc/symcc.c
+++ b/custom_mutators/symcc/symcc.c
@@ -184,18 +184,18 @@ void afl_custom_queue_new_entry(my_mutator_t * data,
 
         struct stat st;
         u8 *source_name = alloc_printf("%s/%s", data->tmp_dir, nl[i]->d_name);
-        u8 *destination_name =
-            alloc_printf("%s/%s.%s", data->out_dir, origin_name, nl[i]->d_name);
         DBG("test=%s\n", fn);
         if (stat(source_name, &st) == 0 && S_ISREG(st.st_mode) && st.st_size) {
 
+          u8 *destination_name =
+              alloc_printf("%s/%s.%s", data->out_dir, origin_name, nl[i]->d_name);
           rename(source_name, destination_name);
+          ck_free(destination_name);
           DBG("found=%s\n", source_name);
 
         }
 
         ck_free(source_name);
-        ck_free(destination_name);
         free(nl[i]);
 
       }