From 91b22ae21acd0b3171814b47b0dead027f8da779 Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Thu, 25 Jan 2024 07:03:50 +0000 Subject: Replace unchecked allocations with calls to xmalloc.h functions --- spawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spawn.c') diff --git a/spawn.c b/spawn.c index 90b892f3..6935a29a 100644 --- a/spawn.c +++ b/spawn.c @@ -145,7 +145,7 @@ spawn_expand_template(const struct config_spawn_template *template, expanded[len] = '\0'; \ } while (0) - *argv = malloc((*argc + 1) * sizeof((*argv)[0])); + *argv = xmalloc((*argc + 1) * sizeof((*argv)[0])); /* Expand the provided keys */ for (size_t i = 0; i < *argc; i++) { -- cgit v1.3