Properly clean up memory on exit(libretrodb_tool)

This commit is contained in:
meepingsnesroms 2017-11-17 16:44:15 -08:00
parent b3e22f6060
commit 9d598cb917

View File

@ -177,6 +177,7 @@ int main(int argc, char ** argv)
goto error;
}
libretrodb_cursor_close(cur);
libretrodb_close(db);
error:
@ -184,5 +185,7 @@ error:
libretrodb_free(db);
if (cur)
libretrodb_cursor_free(cur);
if (q)
libretrodb_query_free(q);
return 1;
}