summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-01-06 17:58:25 +0100
committerAllan McRae <allan@archlinux.org>2014-01-10 05:30:05 +0100
commit3f34e0936abba7100b245726928f381ec06daeb1 (patch)
treee0b3b4949ddfedfdf6e5d2397efc89753c803c48 /src
parent480a9ff82fe6d560c7d6e7b6e5e5ecad30699f12 (diff)
downloadpacman-3f34e0936abba7100b245726928f381ec06daeb1.tar.gz
pacman-3f34e0936abba7100b245726928f381ec06daeb1.tar.xz
create_verbose_row: free malloc'd strings
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 58b0ceca..f6ccaf89 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -808,23 +808,23 @@ static alpm_list_t *create_verbose_row(pm_target_t *target)
} else {
pm_asprintf(&str, "%s", alpm_pkg_get_name(target->remove));
}
- add_table_cell(&ret, str, CELL_NORMAL);
+ add_table_cell(&ret, str, CELL_NORMAL | CELL_FREE);
/* old and new versions */
pm_asprintf(&str, "%s",
target->remove != NULL ? alpm_pkg_get_version(target->remove) : "");
- add_table_cell(&ret, str, CELL_NORMAL);
+ add_table_cell(&ret, str, CELL_NORMAL | CELL_FREE);
pm_asprintf(&str, "%s",
target->install != NULL ? alpm_pkg_get_version(target->install) : "");
- add_table_cell(&ret, str, CELL_NORMAL);
+ add_table_cell(&ret, str, CELL_NORMAL | CELL_FREE);
/* and size */
size -= target->remove ? alpm_pkg_get_isize(target->remove) : 0;
size += target->install ? alpm_pkg_get_isize(target->install) : 0;
human_size = humanize_size(size, 'M', 2, &label);
pm_asprintf(&str, "%.2f %s", human_size, label);
- add_table_cell(&ret, str, CELL_RIGHT_ALIGN);
+ add_table_cell(&ret, str, CELL_RIGHT_ALIGN | CELL_FREE);
size = target->install ? alpm_pkg_download_size(target->install) : 0;
if(size != 0) {
@@ -833,7 +833,7 @@ static alpm_list_t *create_verbose_row(pm_target_t *target)
} else {
str = NULL;
}
- add_table_cell(&ret, str, CELL_RIGHT_ALIGN);
+ add_table_cell(&ret, str, CELL_RIGHT_ALIGN | CELL_FREE);
return ret;
}