diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-11-23 13:35:57 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-11-23 13:56:03 -0500 |
commit | cdbd5e6fcf1f447b515e717f7d7194471ef714a7 (patch) | |
tree | 80e35850febdda9416a1306c8805f2a1da3dabc8 /src/ctx.c | |
parent | 9032d107ab759450c21fea8f82865ff48c743132 (diff) | |
download | bfs-cdbd5e6fcf1f447b515e717f7d7194471ef714a7.tar.xz |
ctx: Switch paths from darray to RESERVE()
Diffstat (limited to 'src/ctx.c')
-rw-r--r-- | src/ctx.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -4,7 +4,6 @@ #include "ctx.h" #include "alloc.h" #include "color.h" -#include "darray.h" #include "diag.h" #include "expr.h" #include "mtab.h" @@ -242,10 +241,10 @@ int bfs_ctx_free(struct bfs_ctx *ctx) { free_colors(ctx->colors); - for (size_t i = 0; i < darray_length(ctx->paths); ++i) { + for (size_t i = 0; i < ctx->npaths; ++i) { free((char *)ctx->paths[i]); } - darray_free(ctx->paths); + free(ctx->paths); free(ctx->argv); free(ctx); |