summaryrefslogtreecommitdiffstats
path: root/src/xspawn.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-06-19 12:11:36 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-06-20 14:26:09 -0400
commit90ded13e589b0089167ef25ca3d26be599dfec9b (patch)
treed5a007948587f62fff62c851ddd3886b5a5e78ed /src/xspawn.c
parent9ceb2b27577f1be3f30edb40a45117066fc78c51 (diff)
downloadbfs-90ded13e589b0089167ef25ca3d26be599dfec9b.tar.xz
alloc: New header for memory allocation utilities
Diffstat (limited to 'src/xspawn.c')
-rw-r--r--src/xspawn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xspawn.c b/src/xspawn.c
index 740e38e..2cabdcc 100644
--- a/src/xspawn.c
+++ b/src/xspawn.c
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: 0BSD
#include "xspawn.h"
+#include "alloc.h"
#include "bfstd.h"
#include "config.h"
#include "list.h"
@@ -62,7 +63,7 @@ int bfs_spawn_setflags(struct bfs_spawn *ctx, enum bfs_spawn_flags flags) {
/** Add a spawn action to the chain. */
static struct bfs_spawn_action *bfs_spawn_add(struct bfs_spawn *ctx, enum bfs_spawn_op op) {
- struct bfs_spawn_action *action = malloc(sizeof(*action));
+ struct bfs_spawn_action *action = ALLOC(struct bfs_spawn_action);
if (!action) {
return NULL;
}