SQLite: Fix memory leaks in No-Intro DB

This commit is contained in:
Vicki Pfau 2019-05-08 12:49:15 -07:00
parent 7ea054ee01
commit 6562e1cfec
1 changed files with 3 additions and 0 deletions

View File

@ -263,6 +263,8 @@ bool NoIntroDBLoadClrMamePro(struct NoIntroDB* db, struct VFile* vf) {
free((void*) dbType);
free((void*) dbVersion);
sqlite3_finalize(gamedbTable);
sqlite3_finalize(gamedbDrop);
sqlite3_finalize(gameTable);
sqlite3_finalize(romTable);
@ -275,6 +277,7 @@ bool NoIntroDBLoadClrMamePro(struct NoIntroDB* db, struct VFile* vf) {
}
void NoIntroDBDestroy(struct NoIntroDB* db) {
sqlite3_finalize(db->crc32);
sqlite3_close(db->db);
free(db);
}