kernel: core_hook: fix missed path_put

make sure to path_put() on all codepaths after kern_path() success

Signed-off-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
Signed-off-by: rsuntk <90097027+rsuntk@users.noreply.github.com>
This commit is contained in:
backslashxx
2025-06-10 14:13:07 +00:00
committed by ShirkNeko
parent 1726d0da58
commit 70b4551936

View File

@@ -1021,6 +1021,7 @@ static void ksu_try_umount(const char *mnt, bool check_mnt, int flags)
if (path.dentry != path.mnt->mnt_root) {
// it is not root mountpoint, maybe umounted by others already.
path_put(&path);
return;
}
@@ -1040,6 +1041,7 @@ static void ksu_try_umount(const char *mnt, bool check_mnt, int flags)
#else
ksu_sys_umount(mnt, flags);
#endif
path_put(&path);
}
#ifdef CONFIG_KSU_SUSFS_TRY_UMOUNT