diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-29 13:16:07 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-29 13:16:07 -0400 |
| commit | 571e6f4f55a23357754c4b4ba269e20392966ac1 (patch) | |
| tree | 17396e814a2727404f5cce97859970a39e78b4e0 | |
| parent | ef9d7bd1d819a908479e7c408da17242b64092e3 (diff) | |
| download | stasis-571e6f4f55a23357754c4b4ba269e20392966ac1.tar.gz | |
ni_free: return on NULL
| -rw-r--r-- | src/lib/core/ini.c | 3 |
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]) { |
