Code

filelist: free entries with g_slice_free()
authorMax Kellermann <max@duempel.org>
Fri, 19 Sep 2008 14:44:23 +0000 (16:44 +0200)
committerMax Kellermann <max@duempel.org>
Fri, 19 Sep 2008 14:44:23 +0000 (16:44 +0200)
Somehow I forgot about changing free() to g_slice_free() in the
previous patch...

src/filelist.c

index e21722ec4dd14bf7f79dcd362b464d1f6d12eb26..6e4ebed55d84499e126bd9703c00f63c823ecc76 100644 (file)
@@ -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;