summaryrefslogtreecommitdiffstats
path: root/dexdump
diff options
context:
space:
mode:
authorYou Kim <you.kim72@gmail.com>2012-12-25 23:51:01 +0900
committerYou Kim <you.kim72@gmail.com>2012-12-25 23:51:01 +0900
commitf1aa871d4d39dc7f6bcbd8cb77a9f54c6cbd2ae9 (patch)
treedd1dedb4af969bf16ae0959f80620c0f990f3d8e /dexdump
parentd038067321dbf062089bfc7cda27955a78690a4b (diff)
downloadandroid_dalvik-f1aa871d4d39dc7f6bcbd8cb77a9f54c6cbd2ae9.tar.gz
android_dalvik-f1aa871d4d39dc7f6bcbd8cb77a9f54c6cbd2ae9.tar.bz2
android_dalvik-f1aa871d4d39dc7f6bcbd8cb77a9f54c6cbd2ae9.zip
DexDump: Leak in FieldMethodInfo.signature
Free pMethInfo->signature when filled by getMethodInfo. Change-Id: Id278d732374daceb7b8b05be7f433af25eee0c27
Diffstat (limited to 'dexdump')
-rw-r--r--dexdump/DexDump.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/dexdump/DexDump.cpp b/dexdump/DexDump.cpp
index 6ecf67168..0d7b42539 100644
--- a/dexdump/DexDump.cpp
+++ b/dexdump/DexDump.cpp
@@ -787,6 +787,7 @@ static char* indexString(DexFile* pDexFile,
outSize = snprintf(buf, bufSize, "%s.%s:%s // method@%0*x",
methInfo.classDescriptor, methInfo.name,
methInfo.signature, width, index);
+ free((void *) methInfo.signature);
} else {
outSize = snprintf(buf, bufSize, "<method?> // method@%0*x",
width, index);
@@ -1069,6 +1070,7 @@ void dumpBytecodes(DexFile* pDexFile, const DexMethod* pDexMethod)
printf("%06x: |[%06x] %s.%s:%s\n",
startAddr, startAddr,
className, methInfo.name, methInfo.signature);
+ free((void *) methInfo.signature);
insnIdx = 0;
while (insnIdx < (int) pCode->insnsSize) {