fix: correct reading for hash function

This commit is contained in:
ngn
2024-07-11 07:52:00 +03:00
parent 839bcb47bf
commit 5cdb857988
7 changed files with 26 additions and 7 deletions

View File

@ -248,13 +248,15 @@ void lm_database_files_next_free(lm_database_t *db, lm_pkg_t *pkg, char **path,
return;
}
if(NULL != db->files_st)
if(NULL != db->files_st){
sqlite3_finalize(db->files_st);
db->files_st = NULL;
}
if(NULL == *path)
if(NULL != path)
free(*path);
if(NULL == *hash)
if(NULL != hash)
free(*hash);
*keep = false;