aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/fstree/mknode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/fstree/mknode.c b/lib/fstree/mknode.c
index 7d6e315..11026f6 100644
--- a/lib/fstree/mknode.c
+++ b/lib/fstree/mknode.c
@@ -88,14 +88,13 @@ tree_node_t *fstree_mknode(tree_node_t *parent, const char *name,
}
if (parent != NULL) {
- fstree_insert_sorted(parent, n);
-
if (parent->link_count == 0x0FFFF) {
free(n);
errno = EMLINK;
return NULL;
}
+ fstree_insert_sorted(parent, n);
parent->link_count++;
}