mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
libalpm: use FREELIST when possible
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
2322909703
commit
cfcc550e2a
@ -295,8 +295,7 @@ static int upgrade_remove(pmpkg_t *oldpkg, pmpkg_t *newpkg, pmtrans_t *trans, pm
|
||||
tr = NULL;
|
||||
|
||||
/* restore our "NoUpgrade" list to previous state */
|
||||
alpm_list_free_inner(handle->noupgrade, free);
|
||||
alpm_list_free(handle->noupgrade);
|
||||
FREELIST(handle->noupgrade);
|
||||
handle->noupgrade = old_noupgrade;
|
||||
|
||||
if(ret == -1) {
|
||||
|
@ -307,8 +307,7 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
|
||||
conflicts = add_fileconflict(conflicts, PM_CONFLICT_TYPE_TARGET, path,
|
||||
alpm_pkg_get_name(p1), alpm_pkg_get_name(p2));
|
||||
}
|
||||
alpm_list_free_inner(tmpfiles, &free);
|
||||
alpm_list_free(tmpfiles);
|
||||
FREELIST(tmpfiles);
|
||||
}
|
||||
}
|
||||
|
||||
@ -413,8 +412,7 @@ alpm_list_t *_alpm_db_find_conflicts(pmdb_t *db, pmtrans_t *trans, char *root)
|
||||
}
|
||||
}
|
||||
}
|
||||
alpm_list_free_inner(tmpfiles, &free);
|
||||
alpm_list_free(tmpfiles);
|
||||
FREELIST(tmpfiles);
|
||||
}
|
||||
|
||||
return(conflicts);
|
||||
|
@ -1022,8 +1022,7 @@ pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full)
|
||||
_alpm_log(PM_LOG_ERROR, _("missing package filelist in %s, generating one\n"), pkgfile);
|
||||
info->files = all_files;
|
||||
} else {
|
||||
alpm_list_free_inner(all_files, free);
|
||||
alpm_list_free(all_files);
|
||||
FREELIST(all_files);
|
||||
}
|
||||
|
||||
/* this is IMPORTANT - "checking for conflicts" requires a sorted list, so we
|
||||
|
Loading…
Reference in New Issue
Block a user