mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +00:00
fix #447: leak in compile.cpp (thanks, @mretallack!)
This commit is contained in:
parent
b766193966
commit
82fd3a8dcb
@ -7030,9 +7030,9 @@ void compile(MyThread* t, Context* context)
|
|||||||
|
|
||||||
c->restoreState(state);
|
c->restoreState(state);
|
||||||
|
|
||||||
ir::Type* stackMap = (ir::Type*)malloc(
|
ir::Type* stackMap2 = (ir::Type*)malloc(
|
||||||
sizeof(ir::Type) * context->method->code()->maxStack());
|
sizeof(ir::Type) * context->method->code()->maxStack());
|
||||||
Frame frame2(&frame, stackMap);
|
Frame frame2(&frame, stackMap2);
|
||||||
|
|
||||||
unsigned end = duplicatedBaseIp + exceptionHandlerEnd(eh);
|
unsigned end = duplicatedBaseIp + exceptionHandlerEnd(eh);
|
||||||
if (exceptionHandlerIp(eh) >= static_cast<unsigned>(start)
|
if (exceptionHandlerIp(eh) >= static_cast<unsigned>(start)
|
||||||
@ -7053,6 +7053,7 @@ void compile(MyThread* t, Context* context)
|
|||||||
context->eventLog.append(PopContextEvent);
|
context->eventLog.append(PopContextEvent);
|
||||||
|
|
||||||
eventIndex = calculateFrameMaps(t, context, 0, eventIndex, 0);
|
eventIndex = calculateFrameMaps(t, context, 0, eventIndex, 0);
|
||||||
|
free(stackMap2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user