From 8e622221809bf852b1063db00493475b77beefed Mon Sep 17 00:00:00 2001 From: You Kim Date: Wed, 3 Apr 2013 02:13:46 +0900 Subject: [PATCH] Fix a minor leaks caused by failed initializations.(typo) Change-Id: I62bc3ea48938a4f54e9f47218d4025e954a6d566 --- vm/compiler/Compiler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vm/compiler/Compiler.cpp b/vm/compiler/Compiler.cpp index cdd62ccb8..188027f3d 100644 --- a/vm/compiler/Compiler.cpp +++ b/vm/compiler/Compiler.cpp @@ -448,7 +448,7 @@ static bool compilerThreadStartup(void) pJitProfTable = (unsigned char *)malloc(JIT_PROF_SIZE); if (!pJitProfTable) { ALOGE("jit prof table allocation failed"); - free(pJitProfTable); + free(pJitTable); dvmUnlockMutex(&gDvmJit.tableLock); goto fail; } @@ -464,6 +464,8 @@ static bool compilerThreadStartup(void) calloc(1, sizeof(*pJitTraceProfCounters)); if (!pJitTraceProfCounters) { ALOGE("jit trace prof counters allocation failed"); + free(pJitTable); + free(pJitProfTable); dvmUnlockMutex(&gDvmJit.tableLock); goto fail; } -- 2.11.0