Fix possible resource leaks

See issue #1691.
This commit is contained in:
Martin Kleusberg
2018-12-27 11:55:21 +01:00
parent 730b494ce7
commit 45a82252e1
2 changed files with 4 additions and 3 deletions

View File

@@ -251,8 +251,9 @@ void RowLoader::process (Task & t)
QMutexLocker lk(&cache_mutex);
cache_data.set(row++, std::move(rowdata));
}
sqlite3_finalize(stmt);
}
sqlite3_finalize(stmt);
if(row != t.row_begin)
emit fetched(t.token, t.row_begin, row);