From 571e6f4f55a23357754c4b4ba269e20392966ac1 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 9c332ca..2cb0ee4 100644 --- a/src/lib/core/ini.c +++ b/src/lib/core/ini.c @@ -513,6 +513,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