about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-07-10 00:43:53 +0100
committerJames Booth <boothj5@gmail.com>2016-07-10 00:43:53 +0100
commit44862fe84233f82d997c458b2eb162af9ae6cf0b (patch)
tree3b0113204f85e7c5a83f250f2d51ea480c0ee43e /src
parentd24a0508f47d3021ebe17e60a7aa2349c49cbadb (diff)
downloadprofani-tty-44862fe84233f82d997c458b2eb162af9ae6cf0b.tar.gz
Remove string allocation for conflists
Diffstat (limited to 'src')
-rw-r--r--src/config/conflists.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config/conflists.c b/src/config/conflists.c
index b005ccb8..00005924 100644
--- a/src/config/conflists.c
+++ b/src/config/conflists.c
@@ -64,7 +64,7 @@ conf_string_list_add(GKeyFile *keyfile, const char *const group, const char *con
         GList *curr = glist;
         i = 0;
         while (curr) {
-            new_list[i++] = strdup(curr->data);
+            new_list[i++] = curr->data;
             curr = g_list_next(curr);
         }
         new_list[i] = NULL;
@@ -73,7 +73,7 @@ conf_string_list_add(GKeyFile *keyfile, const char *const group, const char *con
     // list not found
     } else {
         const gchar* new_list[2];
-        new_list[0] = strdup(item);
+        new_list[0] = item;
         new_list[1] = NULL;
         g_key_file_set_string_list(keyfile, group, key, new_list, 1);
     }
@@ -114,7 +114,7 @@ conf_string_list_remove(GKeyFile *keyfile, const char *const group, const char *
                 GList *curr = glist;
                 i = 0;
                 while (curr) {
-                    new_list[i++] = strdup(curr->data);
+                    new_list[i++] = curr->data;
                     curr = g_list_next(curr);
                 }
                 new_list[i] = NULL;