diff options
author | Max Kellermann <max@duempel.org> | 2008-11-30 17:02:19 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-11-30 17:02:19 +0100 |
commit | 7c5f89a52838cfe24b3bff7e384fd17d1a1f5ba2 (patch) | |
tree | 406730611572fbe145402062717540fce1e65f8f | |
parent | 3d1639bf8e50e90ab593dfdec3700760707ce03b (diff) | |
download | mpd-7c5f89a52838cfe24b3bff7e384fd17d1a1f5ba2.tar.gz mpd-7c5f89a52838cfe24b3bff7e384fd17d1a1f5ba2.tar.xz mpd-7c5f89a52838cfe24b3bff7e384fd17d1a1f5ba2.zip |
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.
-rw-r--r-- | src/screen_search.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/screen_search.c b/src/screen_search.c index 235eeeecc..3856e422f 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); |