Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormorganamilo <morganamilo@archlinux.org>2021-04-20 09:48:20 +0100
committerAllan McRae <allan@archlinux.org>2021-04-23 09:40:38 +1000
commit63ad8b8b7639ac29fad6c4e0dcc699510c47d587 (patch)
tree7c5737cc4e067d4b9d4f3ea06c037f4d40d1bc8a /src
parenta33cdac10bf1a68279ea1b9baa26aa09126f1ca4 (diff)
pacman: fix total bar leaking
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/callback.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 0a9aa4b7..3f32360c 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -340,7 +340,7 @@ void cb_event(alpm_event_t *event)
on_progress = 1;
list_total_pkgs = event->pkg_retrieve.num;
list_total = event->pkg_retrieve.total_size;
- total_enabled = config->totaldownload && list_total;
+ total_enabled = config->totaldownload && list_total && dload_progressbar_enabled();
if(total_enabled) {
init_total_progressbar();
}
@@ -405,9 +405,10 @@ void cb_event(alpm_event_t *event)
case ALPM_EVENT_PKG_RETRIEVE_DONE:
case ALPM_EVENT_PKG_RETRIEVE_FAILED:
console_cursor_move_end();
- if(total_enabled && dload_progressbar_enabled()) {
+ if(total_enabled) {
update_bar_finalstats(totalbar);
draw_pacman_progress_bar(totalbar);
+ free(totalbar);
printf("\n");
}
total_enabled = 0;