summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 8f5a1649..20bb516c 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -69,7 +69,7 @@ int alpm_initialize(char *root)
handle = handle_new();
if(handle == NULL) {
- RET_ERR(PM_ERR_MEM_ERROR, -1);
+ RET_ERR(PM_ERR_MEMORY, -1);
}
/* lock db */
@@ -111,10 +111,8 @@ int alpm_release()
}
/* and also sync ones */
for(i = handle->dbs_sync; i; i = i->next) {
- if(i->data) {
- db_close(i->data);
- i->data = NULL;
- }
+ db_close(i->data);
+ i->data = NULL;
}
FREEHANDLE(handle);