Skip to content

Commit 211e464

Browse files
rsuntkbackslashxx
andauthored
kernel: core_hook: fix refcount leaks on try_umount (#2635)
Signed-off-by: backslashxx <[email protected]> Signed-off-by: rsuntk <[email protected]> Co-authored-by: backslashxx <[email protected]>
1 parent 0fe72a8 commit 211e464

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/core_hook.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,11 +541,13 @@ static void try_umount(const char *mnt, bool check_mnt, int flags)
541541

542542
if (path.dentry != path.mnt->mnt_root) {
543543
// it is not root mountpoint, maybe umounted by others already.
544+
path_put(&path);
544545
return;
545546
}
546547

547548
// we are only interest in some specific mounts
548549
if (check_mnt && !should_umount(&path)) {
550+
path_put(&path);
549551
return;
550552
}
551553

0 commit comments

Comments
 (0)