summaryrefslogtreecommitdiffstats
path: root/src/ctx.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-11-23 13:35:57 -0500
committerTavian Barnes <tavianator@tavianator.com>2023-11-23 13:56:03 -0500
commitcdbd5e6fcf1f447b515e717f7d7194471ef714a7 (patch)
tree80e35850febdda9416a1306c8805f2a1da3dabc8 /src/ctx.c
parent9032d107ab759450c21fea8f82865ff48c743132 (diff)
downloadbfs-cdbd5e6fcf1f447b515e717f7d7194471ef714a7.tar.xz
ctx: Switch paths from darray to RESERVE()
Diffstat (limited to 'src/ctx.c')
-rw-r--r--src/ctx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ctx.c b/src/ctx.c
index 692f5c5..f5dc465 100644
--- a/src/ctx.c
+++ b/src/ctx.c
@@ -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);