From 9d37911e194e526fa164dab43a0d4546fa14ddd2 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 29 Apr 2026 13:16:07 -0400 Subject: ni_free: return on NULL --- src/lib/core/ini.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/core/ini.c b/src/lib/core/ini.c index b761f4d..ba3ab63 100644 --- a/src/lib/core/ini.c +++ b/src/lib/core/ini.c @@ -516,6 +516,9 @@ char *unquote(char *s) { } void ini_free(struct INIFILE **ini) { + if (!(*ini)) { + return; + } for (size_t section = 0; section < (*ini)->section_count; section++) { for (size_t data = 0; data < (*ini)->section[section]->data_count; data++) { if ((*ini)->section[section]->data[data]) { -- cgit