Possible Leak in UnitEmitter

I was looking at a jemalloc profile of HPHP ram and noticed
250 MB of RAM allocated from UnitEmitter::UnitEmitter. This
doesn't make sense since the memory is released on destruction.
I think that we're calling setBc which leaks the memory
Esse commit está contido em:
Ben Maurer
2013-06-13 12:45:54 -07:00
commit de Sara Golemon
commit 69143a273c
+3
Ver Arquivo
@@ -2229,6 +2229,9 @@ void UnitEmitter::addTrivialPseudoMain() {
}
void UnitEmitter::setBc(const uchar* bc, size_t bclen) {
if (m_bc) {
free(m_bc);
}
m_bc = (uchar*)malloc(bclen);
m_bcmax = bclen;
memcpy(m_bc, bc, bclen);