summaryrefslogtreecommitdiff
path: root/lib/fstree/gen_inode_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fstree/gen_inode_table.c')
-rw-r--r--lib/fstree/gen_inode_table.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/fstree/gen_inode_table.c b/lib/fstree/gen_inode_table.c
index 98294fa..04f68da 100644
--- a/lib/fstree/gen_inode_table.c
+++ b/lib/fstree/gen_inode_table.c
@@ -7,6 +7,7 @@
#include "config.h"
#include "fstree.h"
+#include "util.h"
#include <stdlib.h>
#include <stdio.h>
@@ -60,7 +61,8 @@ int fstree_gen_inode_table(fstree_t *fs)
size_t inum = 2;
fs->inode_tbl_size = count_nodes(fs->root) + 2;
- fs->inode_table = calloc(sizeof(tree_node_t *), fs->inode_tbl_size);
+ fs->inode_table = alloc_array(sizeof(tree_node_t *),
+ fs->inode_tbl_size);
if (fs->inode_table == NULL) {
perror("allocating inode table");