mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
(libretro-db) Fix query leaks
This commit is contained in:
parent
dc3d096a46
commit
18a4c1029d
@ -323,8 +323,11 @@ retry:
|
|||||||
if (cursor->query)
|
if (cursor->query)
|
||||||
{
|
{
|
||||||
if (!libretrodb_query_filter(cursor->query, out))
|
if (!libretrodb_query_filter(cursor->query, out))
|
||||||
|
{
|
||||||
|
rmsgpack_dom_value_free(out);
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -886,6 +886,10 @@ void libretrodb_query_free(void *q)
|
|||||||
|
|
||||||
for (i = 0; i < real_q->root.argc; i++)
|
for (i = 0; i < real_q->root.argc; i++)
|
||||||
argument_free(&real_q->root.argv[i]);
|
argument_free(&real_q->root.argv[i]);
|
||||||
|
|
||||||
|
free(real_q->root.argv);
|
||||||
|
real_q->root.argv = NULL;
|
||||||
|
free(real_q);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *libretrodb_query_compile(libretrodb_t *db,
|
void *libretrodb_query_compile(libretrodb_t *db,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user