Skip to content

Commit b97c1bc

Browse files
committed
avoid leaks on multiple calls to relooper MakeOutputBuffer
1 parent d1f37af commit b97c1bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/relooper/Relooper.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,7 @@ void Relooper::SetOutputBuffer(char *Buffer, int Size) {
11911191
}
11921192

11931193
void Relooper::MakeOutputBuffer(int Size) {
1194+
if (OutputBufferRoot && OutputBufferSize >= Size && OutputBufferOwned) return;
11941195
OutputBufferRoot = OutputBuffer = (char*)malloc(Size);
11951196
OutputBufferSize = Size;
11961197
OutputBufferOwned = true;

0 commit comments

Comments
 (0)