mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-29 00:23:23 -05:00
Fix memory leak if index clause is used
This commit is contained in:
parent
0245813d34
commit
a1e2f53ab1
3
src/db.c
3
src/db.c
@ -966,6 +966,9 @@ db_build_query_items(struct query_params *qp, char **q)
|
|||||||
else
|
else
|
||||||
query = sqlite3_mprintf("SELECT f.* FROM files f WHERE f.disabled = 0 %s;", sort);
|
query = sqlite3_mprintf("SELECT f.* FROM files f WHERE f.disabled = 0 %s;", sort);
|
||||||
|
|
||||||
|
if (idx)
|
||||||
|
sqlite3_free(idx);
|
||||||
|
|
||||||
if (!query)
|
if (!query)
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_DB, "Out of memory for query string\n");
|
DPRINTF(E_LOG, L_DB, "Out of memory for query string\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user