summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/userpref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/userpref.c b/src/userpref.c
index f4a22fd..cd29c43 100644
--- a/src/userpref.c
+++ b/src/userpref.c
@@ -140,7 +140,7 @@ int store_device_public_key(char* public_key)
140 g_io_channel_shutdown(file, TRUE, NULL); 140 g_io_channel_shutdown(file, TRUE, NULL);
141 141
142 /* append device to list */ 142 /* append device to list */
143 gchar** new_devices_list = (gchar**)g_malloc(sizeof(gchar*)* (length + 1)); 143 gchar** new_devices_list = (gchar**)g_malloc(sizeof(gchar*)* (length + 2));
144 int i; 144 int i;
145 for( i = 0; i < length; i++) 145 for( i = 0; i < length; i++)
146 new_devices_list[i] = devices_list[i]; 146 new_devices_list[i] = devices_list[i];