mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
[db] Fix memleak on error from prev commit
This commit is contained in:
parent
541a1a6701
commit
e9d1a2475e
5
src/db.c
5
src/db.c
@ -3604,7 +3604,10 @@ db_pl_delete_bypath(const char *path)
|
|||||||
|
|
||||||
ret = db_query_start(&qp);
|
ret = db_query_start(&qp);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
free(qp.filter);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
while (((ret = db_query_fetch_pl(&qp, &dbpli)) == 0) && (dbpli.id))
|
while (((ret = db_query_fetch_pl(&qp, &dbpli)) == 0) && (dbpli.id))
|
||||||
{
|
{
|
||||||
@ -3615,7 +3618,7 @@ db_pl_delete_bypath(const char *path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
db_query_end(&qp);
|
db_query_end(&qp);
|
||||||
free_query_params(&qp, 1);
|
free(qp.filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user