diff --git a/src/lib_ccx/ccx_encoders_webvtt.c b/src/lib_ccx/ccx_encoders_webvtt.c index f3ba8a89..995a0537 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..a77236a1 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; }