Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-08-20 21:09:52 +0000
committerAllan McRae <allan@archlinux.org>2014-09-16 20:03:33 +1000
commit8bf2c753f57bfb6f8cd0271613000af64ce58020 (patch)
tree8e1f1f1d50ab05225f0f0be8cfefc15a565a2085 /lib
parentd9cf14ff1d69ac8834b84015c7971f55ce77645b (diff)
fix improper FREELIST calls
* conflicts need to be freed with alpm_conflict_free * sync dbs need to be unregistered and are handled by alpm_release Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/conflict.c8
-rw-r--r--lib/libalpm/handle.c1
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c
index 961e3a74..db07102c 100644
--- a/lib/libalpm/conflict.c
+++ b/lib/libalpm/conflict.c
@@ -449,7 +449,9 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
conflicts = add_fileconflict(handle, conflicts, path, p1, p2);
if(handle->pm_errno == ALPM_ERR_MEMORY) {
- FREELIST(conflicts);
+ alpm_list_free_inner(conflicts,
+ (alpm_list_fn_free) alpm_conflict_free);
+ alpm_list_free(conflicts);
alpm_list_free(common_files);
return NULL;
}
@@ -622,7 +624,9 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
if(!resolved_conflict) {
conflicts = add_fileconflict(handle, conflicts, path, p1, NULL);
if(handle->pm_errno == ALPM_ERR_MEMORY) {
- FREELIST(conflicts);
+ alpm_list_free_inner(conflicts,
+ (alpm_list_fn_free) alpm_conflict_free);
+ alpm_list_free(conflicts);
alpm_list_free(tmpfiles);
return NULL;
}
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index fdd269b1..7652d1f7 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -81,7 +81,6 @@ void _alpm_handle_free(alpm_handle_t *handle)
FREE(handle->lockfile);
FREE(handle->arch);
FREE(handle->gpgdir);
- FREELIST(handle->dbs_sync);
FREELIST(handle->noupgrade);
FREELIST(handle->noextract);
FREELIST(handle->ignorepkg);