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.
This commit is contained in:
parent
015cdb21bd
commit
5e52dc0906
1 changed files with 5 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue