Use libretrodb_query_free to cleanup query state in

database_cursor_open
This commit is contained in:
twinaphex 2015-05-28 02:24:51 +02:00
parent 99ea729d1c
commit 1dc9183bb5

View File

@ -231,10 +231,13 @@ static int database_cursor_open(libretrodb_t *db,
if ((libretrodb_cursor_open(db, cur, q)) != 0)
goto error;
if (q)
libretrodb_query_free(q);
return 0;
error:
if (query)
if (q)
libretrodb_query_free(q);
query = NULL;
libretrodb_close(db);