From d9e11a083bbca20d3af34df43599c07e087dfc15 Mon Sep 17 00:00:00 2001 From: "S.J.R. van Schaik" Date: Mon, 12 Jun 2017 13:42:16 +0200 Subject: [PATCH] mufs: only claim ownership of the tree object as the final step in resolve_path() --- source/fs/mufs/dir.c | 2 ++ 1 file changed, 2 insertions(+) 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; }