Fix 2 minor memleaks
Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
5d15bb68f7
commit
60b6cde637
3 changed files with 3 additions and 1 deletions
|
@ -534,7 +534,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
|
||||||
if(!resolved_conflict && dbpkg) {
|
if(!resolved_conflict && dbpkg) {
|
||||||
char *rpath = calloc(PATH_MAX+1, sizeof(char));
|
char *rpath = calloc(PATH_MAX+1, sizeof(char));
|
||||||
if(!realpath(path, rpath)) {
|
if(!realpath(path, rpath)) {
|
||||||
free(rpath);
|
FREE(rpath);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
char *filestr = rpath + strlen(handle->root);
|
char *filestr = rpath + strlen(handle->root);
|
||||||
|
|
|
@ -287,6 +287,7 @@ int SYMEXPORT alpm_option_set_root(const char *root)
|
||||||
|
|
||||||
realroot = calloc(PATH_MAX+1, sizeof(char));
|
realroot = calloc(PATH_MAX+1, sizeof(char));
|
||||||
if(!realpath(root, realroot)) {
|
if(!realpath(root, realroot)) {
|
||||||
|
FREE(realroot);
|
||||||
pm_errno = PM_ERR_NOT_A_DIR;
|
pm_errno = PM_ERR_NOT_A_DIR;
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -352,6 +352,7 @@ int _alpm_sync_prepare(pmtrans_t *trans, pmdb_t *db_local, alpm_list_t *dbs_sync
|
||||||
/* Else, [resolved] now additionally contains [pkg] and all of its
|
/* Else, [resolved] now additionally contains [pkg] and all of its
|
||||||
dependencies not already on the list */
|
dependencies not already on the list */
|
||||||
}
|
}
|
||||||
|
alpm_list_free(preferred);
|
||||||
|
|
||||||
/* If there were unresolvable top-level packages, prompt the user to
|
/* If there were unresolvable top-level packages, prompt the user to
|
||||||
see if they'd like to ignore them rather than failing the sync */
|
see if they'd like to ignore them rather than failing the sync */
|
||||||
|
|
Loading…
Add table
Reference in a new issue