diff --git a/src/test.c b/src/test.c
index 221f0618d13c043b1bfc79fd9bc0a8801f2eef92..6df9454dbd6994cca48f66ffc31fc829115ac929 100644
--- a/src/test.c
+++ b/src/test.c
@@ -206,10 +206,10 @@ void test_instance_remove_task() {
 void test_schedule_creation_view() {
     Instance I = new_list(view_task, delete_task);
 
-    struct task_t* task1 = new_task("T1", 5, 3);
-    struct task_t* task2 = new_task("T2", 3, 0);
-    struct task_t* task3 = new_task("T3", 2, 2);
-    struct task_t* task4 = new_task("T4", 1, 0);
+    struct task_t* task1 = new_task(strdup("T1"), 5, 3);
+    struct task_t* task2 = new_task(strdup("T2"), 3, 0);
+    struct task_t* task3 = new_task(strdup("T3"), 2, 2);
+    struct task_t* task4 = new_task(strdup("T4"), 1, 0);
 
     list_insert_last(I, task1);
     list_insert_last(I, task2);