aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-29 13:16:07 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-29 13:16:07 -0400
commit571e6f4f55a23357754c4b4ba269e20392966ac1 (patch)
tree17396e814a2727404f5cce97859970a39e78b4e0
parentef9d7bd1d819a908479e7c408da17242b64092e3 (diff)
downloadstasis-571e6f4f55a23357754c4b4ba269e20392966ac1.tar.gz
ni_free: return on NULL
-rw-r--r--src/lib/core/ini.c3
1 files changed, 3 insertions, 0 deletions
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]) {