Index: usr.sbin/makefs/mtree.c =================================================================== --- usr.sbin/makefs/mtree.c +++ usr.sbin/makefs/mtree.c @@ -783,6 +783,8 @@ free(node->inode); node->inode = curino; node->inode->nlink++; + /* Reset st since node->inode has been updated. */ + st = &node->inode->st; } }