From 679430cafada056a6a9f900fc460926b43a29a0f Mon Sep 17 00:00:00 2001 From: luoyesiqiu Date: Wed, 19 Jun 2024 23:10:08 +0800 Subject: [PATCH] Remove delete map items code --- shell/src/main/cpp/dpt_hook.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/shell/src/main/cpp/dpt_hook.cpp b/shell/src/main/cpp/dpt_hook.cpp index 0fd9f0cc..92cd7e95 100644 --- a/shell/src/main/cpp/dpt_hook.cpp +++ b/shell/src/main/cpp/dpt_hook.cpp @@ -97,8 +97,6 @@ void patchMethod(uint8_t *begin,__unused const char *location,uint32_t dexSize,i NLOG("[*] patchMethod codeItem patch, methodIndex = %d,insnsSize = %d >>> %p(0x%lx)",codeItem->getMethodIdx(), codeItem->getInsnsSize(), realCodeItemPtr,(realCodeItemPtr - begin)); memcpy(realCodeItemPtr,codeItem->getInsns(),codeItem->getInsnsSize()); - codeItemMap->erase(codeItemIt); - delete codeItem; } else{ NLOG("[*] patchMethod cannot find methodId: %d in codeitem map, dex index: %d(%s)",methodIdx,dexIndex,location);