From: Michael Tremer Date: Tue, 22 Oct 2024 15:47:41 +0000 (+0000) Subject: solutions: Initialize elements X-Git-Tag: 0.9.30~946 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70a8640b3940c21b8cb5f82600b9cd895edbb613;p=pakfire.git solutions: Initialize elements Signed-off-by: Michael Tremer --- 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;