aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-29 12:18:27 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-04-29 12:18:27 -0400
commitc15d52304414f521624c9036f1d3836f43c60f8b (patch)
tree5a9c30e60473eb5367ae1bce88ce5a49c26c52fc
parent6585f4b753deb481c2151cf34828a12c315cc968 (diff)
downloadstasis-c15d52304414f521624c9036f1d3836f43c60f8b.tar.gz
delivery_init_platform: return on allocation error
-rw-r--r--src/lib/delivery/delivery_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/delivery/delivery_init.c b/src/lib/delivery/delivery_init.c
index ec05a0f..0398db3 100644
--- a/src/lib/delivery/delivery_init.c
+++ b/src/lib/delivery/delivery_init.c
@@ -197,6 +197,10 @@ int delivery_init_platform(struct Delivery *ctx) {
}
for (size_t i = 0; i < DELIVERY_PLATFORM_MAX; i++) {
ctx->system.platform[i] = calloc(DELIVERY_PLATFORM_MAXLEN, sizeof(*ctx->system.platform[0]));
+ if (!ctx->system.platform[i]) {
+ SYSERROR("Unable to allocate record %zu in platform array\n", i);
+ return -1;
+ }
}
ctx->system.arch = strdup(uts.machine);