diff options
author | Dan McGee <dan@archlinux.org> | 2008-03-23 22:58:53 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2008-03-23 22:58:53 +0100 |
commit | 5f1ccdbc27e3b4b92f9b65379db17a4d6523975d (patch) | |
tree | 7cacf15fdd0bd20eccebf4787ede5e9a24f9b10b /lib | |
parent | d1ea16dfd0d497aff72d7a315890971e7f070786 (diff) | |
parent | 1086950c82ab649ffc36a00cd8d343da376252fe (diff) | |
download | pacman-5f1ccdbc27e3b4b92f9b65379db17a4d6523975d.tar.gz pacman-5f1ccdbc27e3b4b92f9b65379db17a4d6523975d.tar.xz |
Merge branch 'maint'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libalpm/add.c | 1 | ||||
-rw-r--r-- | lib/libalpm/backup.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 78f6e951..0c3d7735 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -229,6 +229,7 @@ static int upgrade_remove(pmpkg_t *oldpkg, pmpkg_t *newpkg, pmtrans_t *trans, pm char *backup = _alpm_backup_file(b->data); /* safety check (fix the upgrade026 pactest) */ if(!alpm_list_find_str(filelist, backup)) { + FREE(backup); continue; } _alpm_log(PM_LOG_DEBUG, "adding %s to the NoUpgrade array temporarily\n", diff --git a/lib/libalpm/backup.c b/lib/libalpm/backup.c index bedbe8c1..f89df55e 100644 --- a/lib/libalpm/backup.c +++ b/lib/libalpm/backup.c @@ -42,6 +42,9 @@ int _alpm_backup_split(const char *string, char **file, char **hash) if(ptr == NULL) { if(file) { *file = str; + } else { + /* don't need our dup as the fname wasn't requested, so free it */ + FREE(str); } return(0); } |