diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-29 13:16:07 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-05-11 15:50:48 -0400 |
| commit | 9d37911e194e526fa164dab43a0d4546fa14ddd2 (patch) | |
| tree | 7cc724d55401d3457101f70a42dcd20523693bb7 | |
| parent | df6ccdd5e534f175ba735247880c0d3b24b33bd4 (diff) | |
| download | stasis-9d37911e194e526fa164dab43a0d4546fa14ddd2.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 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]) { |
