From: Max Kellermann Date: Tue, 29 Sep 2009 16:20:22 +0000 (+0200) Subject: screen_search: clear return value on error X-Git-Tag: release-0.16~319 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=257e7db4ffd58234e5a77b6576663f44f6eeadc9;p=ncmpc.git screen_search: clear return value on error search_advanced_query() has a redundant "fl!=NULL" check, and it does not clear the "fl" variable after freeing the object. --- diff --git a/src/screen_search.c b/src/screen_search.c index 9ab9a3f..dd8c280 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -299,8 +299,10 @@ search_advanced_query(char *query, struct mpdclient *c) while ((entity = mpd_recv_entity(c->connection)) != NULL) filelist_append(fl, entity); - if (mpdclient_finish_command(c) && fl) + if (mpdclient_finish_command(c)) { filelist_free(fl); + fl = NULL; + } } i=0;