xhook_clear after xhook_refresh

This commit is contained in:
LoveSy 2021-12-14 19:06:57 +08:00 committed by GitHub
parent ad47dba064
commit 87c2f6ad14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,7 +301,7 @@ bool ZygiskModule::RegisterModule(ApiTable *table, long *module) {
table->v1.pltHookExclude = [](const char *path, const char *symbol) {
xhook_ignore(path, symbol);
};
table->v1.pltHookCommit = []() { return xhook_refresh(0) == 0; };
table->v1.pltHookCommit = []{ bool r = xhook_refresh(0) == 0; xhook_clear(); return r; };
table->v1.connectCompanion = [](ZygiskModule *m) { return m->connectCompanion(); };
table->v1.setOption = [](ZygiskModule *m, auto opt) { m->setOption(opt); };