aboutsummaryrefslogtreecommitdiff
path: root/spawn.c
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2024-01-25 07:03:50 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2024-01-25 07:03:50 +0000
commit91b22ae21acd0b3171814b47b0dead027f8da779 (patch)
tree6504247289226858803cded93ffff0dd8aafcad0 /spawn.c
parentwayland: 'mode' is unused when LOG_ENABLE_DBG is not set (diff)
Replace unchecked allocations with calls to xmalloc.h functions
Diffstat (limited to 'spawn.c')
-rw-r--r--spawn.c2
1 files changed, 1 insertions, 1 deletions
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++) {