summaryrefslogtreecommitdiff
path: root/lib/fstree
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fstree')
-rw-r--r--lib/fstree/add_by_path.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fstree/add_by_path.c b/lib/fstree/add_by_path.c
index 8918efc..0afd898 100644
--- a/lib/fstree/add_by_path.c
+++ b/lib/fstree/add_by_path.c
@@ -9,6 +9,7 @@
#include "fstree.h"
#include <string.h>
+#include <assert.h>
#include <errno.h>
tree_node_t *fstree_add_generic(fstree_t *fs, const char *path,
@@ -19,6 +20,7 @@ tree_node_t *fstree_add_generic(fstree_t *fs, const char *path,
if (*path == '\0') {
child = fs->root;
+ assert(child != NULL);
goto out;
}