Replace unchecked allocations with calls to xmalloc.h functions

This commit is contained in:
Craig Barnes 2024-01-25 07:03:50 +00:00
parent 43e27a8843
commit 91b22ae21a
6 changed files with 7 additions and 7 deletions

View file

@ -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++) {