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>
This commit is contained in:
parent
d9cf14ff1d
commit
8bf2c753f5
|
@ -449,7 +449,9 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
|
||||||
|
|
||||||
conflicts = add_fileconflict(handle, conflicts, path, p1, p2);
|
conflicts = add_fileconflict(handle, conflicts, path, p1, p2);
|
||||||
if(handle->pm_errno == ALPM_ERR_MEMORY) {
|
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);
|
alpm_list_free(common_files);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -622,7 +624,9 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle,
|
||||||
if(!resolved_conflict) {
|
if(!resolved_conflict) {
|
||||||
conflicts = add_fileconflict(handle, conflicts, path, p1, NULL);
|
conflicts = add_fileconflict(handle, conflicts, path, p1, NULL);
|
||||||
if(handle->pm_errno == ALPM_ERR_MEMORY) {
|
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);
|
alpm_list_free(tmpfiles);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,6 @@ void _alpm_handle_free(alpm_handle_t *handle)
|
||||||
FREE(handle->lockfile);
|
FREE(handle->lockfile);
|
||||||
FREE(handle->arch);
|
FREE(handle->arch);
|
||||||
FREE(handle->gpgdir);
|
FREE(handle->gpgdir);
|
||||||
FREELIST(handle->dbs_sync);
|
|
||||||
FREELIST(handle->noupgrade);
|
FREELIST(handle->noupgrade);
|
||||||
FREELIST(handle->noextract);
|
FREELIST(handle->noextract);
|
||||||
FREELIST(handle->ignorepkg);
|
FREELIST(handle->ignorepkg);
|
||||||
|
|
Loading…
Reference in New Issue