diff --git a/source/fs/mufs/dir.c b/source/fs/mufs/dir.c index 456076c..2c9639c 100644 --- a/source/fs/mufs/dir.c +++ b/source/fs/mufs/dir.c @@ -128,7 +128,9 @@ struct mufs_tree *resolve_path(struct mufs *fs, const char *path) if (ret < 0) goto err_closedir; + } + if (dir) { tree = dir->tree; dir->tree = NULL; }