Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-24 21:18:09 -0500
committerDan McGee <dan@archlinux.org>2011-03-24 21:18:09 -0500
commit86e7f6075671e08c456f389d8ecba47190c03f0f (patch)
tree2698fd22bbb781a6227ed84b5ef8bbacab647e6e /lib/libalpm/alpm.c
parentcfa2eebdafc4d2341621e24ce61dd5a74a0de9fc (diff)
parentc37c9c5dcae06c1585b4da4c0b838f5b44e1498e (diff)
Merge branch 'maint'
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 4d40d675..bafd922b 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -77,10 +77,19 @@ int SYMEXPORT alpm_initialize(void)
*/
int SYMEXPORT alpm_release(void)
{
+ pmdb_t *db;
+
ALPM_LOG_FUNC;
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
+ /* close local database */
+ db = handle->db_local;
+ if(db) {
+ db->ops->unregister(db);
+ handle->db_local = NULL;
+ }
+
if(alpm_db_unregister_all() == -1) {
return -1;
}