From: Max Kellermann Date: Sun, 30 Nov 2008 16:02:19 +0000 (+0100) Subject: screen_search: use filelist_new() instead of g_malloc0() X-Git-Tag: release-0.12~23 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7c5f89a52838cfe24b3bff7e384fd17d1a1f5ba2;p=ncmpc.git 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. --- 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);