From 57f985292efbb750c3477f4f3a590766a1f0f322 Mon Sep 17 00:00:00 2001 From: ThePedroo Date: Mon, 9 Jun 2025 14:34:30 -0300 Subject: [PATCH] fix: leak of dir fd in ReZygiskd This commit fixes the leak of dir fd caused due to not calling "closedir" after dir being used. --- zygiskd/src/zygiskd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zygiskd/src/zygiskd.c b/zygiskd/src/zygiskd.c index 99ee1eb..b1a5740 100644 --- a/zygiskd/src/zygiskd.c +++ b/zygiskd/src/zygiskd.c @@ -130,6 +130,8 @@ static void load_modules(enum Architecture arch, struct Context *restrict contex context->modules[context->len].companion = -1; context->len++; } + + closedir(dir); } static void free_modules(struct Context *restrict context) {