settings.c

changeset 11
06cbd0ec003d
parent 10
ecf787666f44
child 16
bc9a0fefd892
--- a/settings.c	Thu Sep 15 13:29:06 2011 +0200
+++ b/settings.c	Thu Sep 15 13:38:03 2011 +0200
@@ -8,7 +8,7 @@
 #include "settings.h"
 
 settings_t* new_settings_t() {
-  settings_t *settings = malloc(sizeof(settings_t*));
+  settings_t *settings = malloc(sizeof(settings_t));
   if (settings != NULL) {
   #ifdef _WIN32
     settings->fileSeparator      = '\\';
@@ -25,6 +25,6 @@
 }
 
 void destroy_settings_t(settings_t* settings) {
-  destroy_suffix_list_t(settings->suffixList);
+  free(settings->suffixList);
   free(settings);
 }

mercurial