about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/tools/parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/parser.c b/src/tools/parser.c
index 942b17ca..1ec539df 100644
--- a/src/tools/parser.c
+++ b/src/tools/parser.c
@@ -256,12 +256,12 @@ parse_args_with_freetext(const char * const inp, int min, int max)
         }
     }
 
-    free(copy);
-
     if (in_token) {
         tokens = g_slist_append(tokens, g_strndup(token_start, token_size));
     }
 
+    free(copy);
+
     int num = g_slist_length(tokens) - 1;
 
     // if num args not valid return NULL