From: Michael Tremer Date: Mon, 19 Apr 2021 16:44:57 +0000 (+0000) Subject: config: Terminate array each round for search X-Git-Tag: 0.9.28~1285^2~319 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=901b776111deebd878d88a5f3f57f3933d75d263;p=pakfire.git config: Terminate array each round for search Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/config.c b/src/libpakfire/config.c index 55e3c8313..5bddb45df 100644 --- a/src/libpakfire/config.c +++ b/src/libpakfire/config.c @@ -239,11 +239,10 @@ char** pakfire_config_sections(struct pakfire_config* config) { return NULL; sections[num_sections - 1] = strdup(entry->section); - } - // Terminate the array - if (num_sections) + // Terminate the array sections[num_sections] = NULL; + } return sections; }