OSDN Git Service

Free the memory associated with the trace descriptor of dropped JIT work orders.
authorBen Cheng <bccheng@android.com>
Tue, 9 Feb 2010 04:57:59 +0000 (20:57 -0800)
committerBen Cheng <bccheng@android.com>
Tue, 9 Feb 2010 04:57:59 +0000 (20:57 -0800)
vm/compiler/Compiler.c

index 705333b..e01ca89 100644 (file)
@@ -62,7 +62,12 @@ bool dvmCompilerWorkEnqueue(const u2 *pc, WorkOrderKind kind, void* info)
     bool result = true;
 
     if (dvmTryLockMutex(&gDvmJit.compilerLock)) {
-        return false;  // Couldn't aquire the lock
+        /*
+         * Make sure the memory associated with the info pointer is freed for
+         * dropped work orders.
+         */
+        free(info);
+        return false;  // Couldn't acquire the lock
     }
 
     /*