Feature: Fix memory leak in mVideoLogContext
Vicki Pfau vi@endrift.com
Wed, 04 Jul 2018 12:46:49 -0700
1 files changed,
12 insertions(+),
0 deletions(-)
jump to
M
src/feature/video-logger.c
→
src/feature/video-logger.c
@@ -682,6 +682,18 @@ }
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); }