diff --git a/kernel/core_hook.c b/kernel/core_hook.c index b0405ed1..57c06b1b 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -566,11 +566,13 @@ 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; } // we are only interest in some specific mounts if (check_mnt && !should_umount(&path)) { + path_put(&path); return; }