Fix bad free when encountering an error fetching query results.

This commit is contained in:
Justin Maggard 2014-12-16 15:32:21 -08:00
parent e431b04310
commit 4efca3660f

View File

@ -1913,7 +1913,10 @@ daap_reply_groups(struct evhttp_request *req, struct evbuffer *evbuf, char **uri
evbuffer_free(group);
if (qp.filter)
free(qp.filter);
{
free(qp.filter);
qp.filter = NULL;
}
if (ret < 0)
{
@ -1993,8 +1996,7 @@ daap_reply_groups(struct evhttp_request *req, struct evbuffer *evbuf, char **uri
evbuffer_free(grouplist);
out_qfilter_free:
if (qp.filter)
free(qp.filter);
free(qp.filter);
return -1;
}