From 2d56d067e3211d3806ca324389b1f0df097351ab Mon Sep 17 00:00:00 2001 From: sidgairo18 Date: Sun, 15 Jan 2017 14:02:49 +0530 Subject: [PATCH] Fixed issue #648 --- src/lib_ccx/ccx_encoders_webvtt.c | 3 ++- src/lib_ccx/general_loop.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib_ccx/ccx_encoders_webvtt.c b/src/lib_ccx/ccx_encoders_webvtt.c index f3ba8a89..3155774d 100644 --- a/src/lib_ccx/ccx_encoders_webvtt.c +++ b/src/lib_ccx/ccx_encoders_webvtt.c @@ -182,7 +182,8 @@ int write_stringz_as_webvtt(char *string, struct encoder_ctx *context, LLONG ms_ } written = write(context->out->fh, context->encoded_crlf, context->encoded_crlf_length); if (written != context->encoded_crlf_length) - { + { + free(el); return -1; } begin += strlen((const char *)begin) + 1; diff --git a/src/lib_ccx/general_loop.c b/src/lib_ccx/general_loop.c index 529b3c87..a7c44fb8 100644 --- a/src/lib_ccx/general_loop.c +++ b/src/lib_ccx/general_loop.c @@ -1234,5 +1234,6 @@ int rcwt_loop(struct lib_ccx_ctx *ctx) } // end while(1) dbg_print(CCX_DMT_PARSE, "Processed %d bytes\n", bread); + free(parsebuf); return caps; }