Skip to content

Commit

Permalink
kernelsu: throne_tracker: skip iterate if failed to open dir
Browse files Browse the repository at this point in the history
fix tiann/KernelSU#1800

Change-Id: I89f2ae13e7f9d76a82413d0b7fd60e2de4bed14c
Signed-off-by: Gustavo Mendes <gusttavo.me@outlook.com>
  • Loading branch information
5ec1cff authored and GustavoMends committed Nov 27, 2024
1 parent 9fe620d commit c94c8c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/kernelsu/throne_tracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,13 @@ void search_manager(const char *path, int depth, struct list_head *uid_data)
file = ksu_filp_open_compat(pos->dirpath, O_RDONLY | O_NOFOLLOW, 0);
if (IS_ERR(file)) {
pr_err("Failed to open directory: %s, err: %ld\n", pos->dirpath, PTR_ERR(file));
return;
goto skip_iterate;
}

iterate_dir(file, &ctx.ctx);
filp_close(file, NULL);
}

skip_iterate:
list_del(&pos->list);
if (pos != &data)
kfree(pos);
Expand Down

0 comments on commit c94c8c0

Please sign in to comment.