Commits

Anonymous committed ab3cbf6 Merge

Merge "Fix a minor leaks caused by failed initializations.(typo)"

Comments (0)

Files changed (1)

vm/compiler/Compiler.cpp

     pJitProfTable = (unsigned char *)malloc(JIT_PROF_SIZE);
     if (!pJitProfTable) {
         ALOGE("jit prof table allocation failed");
-        free(pJitProfTable);
+        free(pJitTable);
         dvmUnlockMutex(&gDvmJit.tableLock);
         goto fail;
     }
                              calloc(1, sizeof(*pJitTraceProfCounters));
     if (!pJitTraceProfCounters) {
         ALOGE("jit trace prof counters allocation failed");
+        free(pJitTable);
+        free(pJitProfTable);
         dvmUnlockMutex(&gDvmJit.tableLock);
         goto fail;
     }