Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
morganamilo
5e52dc0906
libalpm: free trans before databases
When releasing the handle, alpm tries to do some self clean up by
freeing the databases and transaction.

However, databases refuse to unregister is there is an in progress
transaction. Causing them to leak if the handle is released while
a transaction is active.
2023-09-20 14:59:39 +01:00

View file

@ -100,6 +100,11 @@ int SYMEXPORT alpm_release(alpm_handle_t *myhandle)
CHECK_HANDLE(myhandle, return -1); CHECK_HANDLE(myhandle, return -1);
/* free transaction memory */
if(myhandle->trans && alpm_trans_release(myhandle) == -1) {
return -1;
}
/* close local database */ /* close local database */
db = myhandle->db_local; db = myhandle->db_local;
if(db) { if(db) {