From 2d56d067e3211d3806ca324389b1f0df097351ab Mon Sep 17 00:00:00 2001 From: sidgairo18 Date: Sun, 15 Jan 2017 14:02:49 +0530 Subject: [PATCH 1/3] 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 f3ba8a892..3155774df 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 529b3c879..a7c44fb80 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; } From 263dd2cb402d77cc068f476cfcaac6b66c95386f Mon Sep 17 00:00:00 2001 From: Siddhartha Gairola Date: Sun, 15 Jan 2017 14:07:04 +0530 Subject: [PATCH 2/3] Update ccx_encoders_webvtt.c --- src/lib_ccx/ccx_encoders_webvtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_ccx/ccx_encoders_webvtt.c b/src/lib_ccx/ccx_encoders_webvtt.c index 3155774df..995a05374 100644 --- a/src/lib_ccx/ccx_encoders_webvtt.c +++ b/src/lib_ccx/ccx_encoders_webvtt.c @@ -183,7 +183,7 @@ 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); + free(el); return -1; } begin += strlen((const char *)begin) + 1; From fad623ed6ad09021e01c0ef34cf86f0f4d48cc0f Mon Sep 17 00:00:00 2001 From: Siddhartha Gairola Date: Sun, 15 Jan 2017 14:08:16 +0530 Subject: [PATCH 3/3] Update general_loop.c --- src/lib_ccx/general_loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_ccx/general_loop.c b/src/lib_ccx/general_loop.c index a7c44fb80..a77236a12 100644 --- a/src/lib_ccx/general_loop.c +++ b/src/lib_ccx/general_loop.c @@ -1234,6 +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); + free(parsebuf); return caps; }