diff options
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r-- | lib/libalpm/alpm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index 4f95832d..a60a4bb6 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); } |