From 4def69cd149e2554790b9b413b8a31c4c193e5cb Mon Sep 17 00:00:00 2001 From: someordinaryidiot# Date: Sun, 15 Sep 2024 22:54:32 +0200 Subject: [PATCH] Fixed potential memory-leak in question() --- src/pacman/util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pacman/util.c b/src/pacman/util.c index 44ffc609..38f8fc5f 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -1739,6 +1739,8 @@ static int question(short preset, const char *format, va_list args) /* Something has gone wrong */ if (format_len < 1) { pm_printf(ALPM_LOG_ERROR, _("vsnprintf failure: Failed to cache prompt: %s\n"), strerror(errno)); + + va_end(args_copy); return 0; }