diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-06-19 12:11:36 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-06-20 14:26:09 -0400 |
commit | 90ded13e589b0089167ef25ca3d26be599dfec9b (patch) | |
tree | d5a007948587f62fff62c851ddd3886b5a5e78ed /src/mtab.c | |
parent | 9ceb2b27577f1be3f30edb40a45117066fc78c51 (diff) | |
download | bfs-90ded13e589b0089167ef25ca3d26be599dfec9b.tar.xz |
alloc: New header for memory allocation utilities
Diffstat (limited to 'src/mtab.c')
-rw-r--r-- | src/mtab.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -2,6 +2,7 @@ // SPDX-License-Identifier: 0BSD #include "mtab.h" +#include "alloc.h" #include "bfstd.h" #include "config.h" #include "darray.h" @@ -87,15 +88,13 @@ fail: } struct bfs_mtab *bfs_mtab_parse(void) { - struct bfs_mtab *mtab = malloc(sizeof(*mtab)); + struct bfs_mtab *mtab = ZALLOC(struct bfs_mtab); if (!mtab) { return NULL; } - mtab->entries = NULL; trie_init(&mtab->names); trie_init(&mtab->types); - mtab->types_filled = false; int error = 0; |