summaryrefslogtreecommitdiffstats
path: root/src/plist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plist.c')
-rw-r--r--src/plist.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plist.c b/src/plist.c
index e64cff2..31490d0 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -212,7 +212,7 @@ char **read_dict_element_strings(xmlNode *dict) {
212 212
213 old = return_me; 213 old = return_me;
214 return_me = realloc(return_me, sizeof(char*) * (current_length+1)); 214 return_me = realloc(return_me, sizeof(char*) * (current_length+1));
215 return_me[current_pos] = strdup(""); 215 return_me[current_pos] = NULL;
216 216
217 return return_me; 217 return return_me;
218} 218}
@@ -224,11 +224,10 @@ void free_dictionary(char **dictionary) {
224 224
225 if (!dictionary) return; 225 if (!dictionary) return;
226 226
227 for (i = 0; strcmp(dictionary[i], ""); i++) { 227 for (i = 0; dictionary[i]; i++) {
228 free(dictionary[i]); 228 free(dictionary[i]);
229 } 229 }
230 230
231 free(dictionary[i]);
232 free(dictionary); 231 free(dictionary);
233} 232}
234 233