From dc97ee9b3613a553f667e2be5763c5cd4ea77777 Mon Sep 17 00:00:00 2001 From: Jiuzhu Dong Date: Sat, 14 Aug 2021 17:28:45 +0800 Subject: [PATCH] fs/mount: fix crash becauseof bad release order N/A Change-Id: I850f0706f4554d140a86f935b8dce07d23beedaf Signed-off-by: Jiuzhu Dong --- fs/mount/fs_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/mount/fs_mount.c b/fs/mount/fs_mount.c index 79477011ea..39bb8da53b 100644 --- a/fs/mount/fs_mount.c +++ b/fs/mount/fs_mount.c @@ -476,8 +476,8 @@ int nx_mount(FAR const char *source, FAR const char *target, /* A lot of goto's! But they make the error handling much simpler */ errout_with_mountpt: - inode_remove(target); inode_release(mountpt_inode); + inode_remove(target); errout_with_semaphore: inode_semgive();