Fix memory leak if index clause is used

This commit is contained in:
chme 2015-09-19 09:26:47 +02:00 committed by ejurgensen
parent 0245813d34
commit a1e2f53ab1

View File

@ -966,6 +966,9 @@ db_build_query_items(struct query_params *qp, char **q)
else
query = sqlite3_mprintf("SELECT f.* FROM files f WHERE f.disabled = 0 %s;", sort);
if (idx)
sqlite3_free(idx);
if (!query)
{
DPRINTF(E_LOG, L_DB, "Out of memory for query string\n");