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:
@@ -591,6 +591,7 @@ static void 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;
|
||||
}
|
||||
|
||||
@@ -604,6 +605,7 @@ static void try_umount(const char *mnt, bool check_mnt, int flags)
|
||||
#else
|
||||
ksu_sys_umount(mnt, flags);
|
||||
#endif
|
||||
path_put(&path);
|
||||
}
|
||||
|
||||
int ksu_handle_setuid(struct cred *new, const struct cred *old)
|
||||
|
||||
Reference in New Issue
Block a user