From: Max Kellermann Date: Fri, 19 Sep 2008 14:44:23 +0000 (+0200) Subject: filelist: free entries with g_slice_free() X-Git-Tag: v0.12_alpha1~216 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7e9bee742cc8e7cc8d47f3a56466337d6d3a8efd;p=ncmpc.git filelist: free entries with g_slice_free() Somehow I forgot about changing free() to g_slice_free() in the previous patch... --- diff --git a/src/filelist.c b/src/filelist.c index e21722e..6e4ebed 100644 --- a/src/filelist.c +++ b/src/filelist.c @@ -46,7 +46,7 @@ filelist_free(struct filelist *filelist) if (entry->entity) mpd_freeInfoEntity(entry->entity); - g_free(entry); + g_slice_free(struct filelist_entry, entry); } g_ptr_array_free(filelist->entries, TRUE); @@ -57,7 +57,7 @@ filelist_free(struct filelist *filelist) struct filelist_entry * filelist_append(struct filelist *filelist, struct mpd_InfoEntity *entity) { - struct filelist_entry *entry = g_slice_alloc(sizeof(*entry)); + struct filelist_entry *entry = g_slice_new(struct filelist_entry); entry->flags = 0; entry->entity = entity;