From 7c5f89a52838cfe24b3bff7e384fd17d1a1f5ba2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 30 Nov 2008 17:02:19 +0100 Subject: [PATCH] screen_search: use filelist_new() instead of g_malloc0() Using the advanced search led to a segmentation fault, because with g_malloc0(), the filelist's "entries" array was not allocated. Use the "official" filelist constructor instead. --- src/screen_search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screen_search.c b/src/screen_search.c index 235eeee..3856e42 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -283,7 +283,7 @@ search_advanced_query(char *query, mpdclient_t *c) mpd_commitSearch(c->connection); - fl = g_malloc0(sizeof(mpdclient_filelist_t)); + fl = filelist_new(NULL); while ((entity=mpd_getNextInfoEntity(c->connection))) filelist_append(fl, entity); -- 2.30.2