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
|
@ -534,7 +534,7 @@ alpm_list_t *_alpm_db_find_fileconflicts(pmdb_t *db, pmtrans_t *trans,
|
|||
if(!resolved_conflict && dbpkg) {
|
||||
char *rpath = calloc(PATH_MAX+1, sizeof(char));
|
||||
if(!realpath(path, rpath)) {
|
||||
free(rpath);
|
||||
FREE(rpath);
|
||||
continue;
|
||||
}
|
||||
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));
|
||||
if(!realpath(root, realroot)) {
|
||||
FREE(realroot);
|
||||
pm_errno = PM_ERR_NOT_A_DIR;
|
||||
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
|
||||
dependencies not already on the list */
|
||||
}
|
||||
alpm_list_free(preferred);
|
||||
|
||||
/* If there were unresolvable top-level packages, prompt the user to
|
||||
see if they'd like to ignore them rather than failing the sync */
|
||||
|
|
Loading…
Reference in New Issue