Feature: Fix memory leak in mVideoLogContext

This commit is contained in:
Vicki Pfau 2018-07-04 12:46:49 -07:00
parent 4767ae42d2
commit 2e330b92a7
1 changed files with 12 additions and 0 deletions

View File

@ -682,6 +682,18 @@ void mVideoLogContextDestroy(struct mCore* core, struct mVideoLogContext* contex
if (context->initialState) {
mappedMemoryFree(context->initialState, context->initialStateSize);
}
size_t i;
for (i = 0; i < context->nChannels; ++i) {
CircleBufferDeinit(&context->channels[i].buffer);
#ifdef USE_ZLIB
if (context->channels[i].inflating) {
inflateEnd(&context->channels[i].inflateStream);
context->channels[i].inflating = false;
}
#endif
}
free(context);
}