aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-22 11:32:03 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-22 11:32:03 -0400
commit5c51880cf2c39c7d4c16a5af51a3502f6cdbcac5 (patch)
tree9358c277ca3986e1b2bd4311846dad9b9c129148 /src
parentfd1e456e05a23919fce4fe7977bcac7c5ed5a513 (diff)
downloadstasis-5c51880cf2c39c7d4c16a5af51a3502f6cdbcac5.tar.gz
ini_init: return on memory error
Diffstat (limited to 'src')
-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 1ecff17..6995eb2 100644
--- a/src/lib/core/ini.c
+++ b/src/lib/core/ini.c
@@ -7,6 +7,9 @@
struct INIFILE *ini_init() {
struct INIFILE *ini = calloc(1, sizeof(*ini));
+ if (!ini) {
+ return NULL;
+ }
ini->section_count = 0;
return ini;
}