diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-05-20 14:37:56 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-05-20 14:37:56 -0400 |
commit | bc952b51f48905392cec5685853fbb44565057a8 (patch) | |
tree | 7c133a045684d4bdc4f023ba134f3a37b792dca6 /src/xspawn.c | |
parent | f642b3dd1271e4a1503ce7629ba36e25d6a59fce (diff) | |
download | bfs-bc952b51f48905392cec5685853fbb44565057a8.tar.xz |
list: Return the removed item from SLIST_POP()
Diffstat (limited to 'src/xspawn.c')
-rw-r--r-- | src/xspawn.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/xspawn.c b/src/xspawn.c index 00fb76e..740e38e 100644 --- a/src/xspawn.c +++ b/src/xspawn.c @@ -49,9 +49,7 @@ int bfs_spawn_init(struct bfs_spawn *ctx) { int bfs_spawn_destroy(struct bfs_spawn *ctx) { while (ctx->head) { - struct bfs_spawn_action *action = ctx->head; - SLIST_POP(ctx); - free(action); + free(SLIST_POP(ctx)); } return 0; |