From 70a8640b3940c21b8cb5f82600b9cd895edbb613 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 22 Oct 2024 15:47:41 +0000 Subject: [PATCH] solutions: Initialize elements Signed-off-by: Michael Tremer --- src/libpakfire/solution.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libpakfire/solution.c b/src/libpakfire/solution.c index ba676cb39..cc69e3a7b 100644 --- a/src/libpakfire/solution.c +++ b/src/libpakfire/solution.c @@ -118,6 +118,10 @@ static char* pakfire_solution_make_string(struct pakfire_solution* solution) { // Allocate memory for all strings char* elements[count + 1]; + // Initialize elements + for (unsigned int i = 0; i < count + 1; i++) + elements[i] = NULL; + // The result string char* s = NULL; -- 2.39.5