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