From 84ba7c5238db40abd5535842861e688c274bd219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20ANDR=C3=89-CHANG?= Date: Sat, 18 Jan 2020 20:15:40 +0000 Subject: [PATCH] Fix segfault (#1192) --- src/lib_ccx/ccx_encoders_common.c | 2 +- src/lib_ccx/lib_ccx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib_ccx/ccx_encoders_common.c b/src/lib_ccx/ccx_encoders_common.c index 5bcb3efb..21e136b7 100644 --- a/src/lib_ccx/ccx_encoders_common.c +++ b/src/lib_ccx/ccx_encoders_common.c @@ -1226,7 +1226,7 @@ int encode_sub(struct encoder_ctx *context, struct cc_subtitle *sub) write_cc_buffer_to_gui(sub->data, context); #endif // PYTHON_API } - freep(sub->data); + freep(&sub->data); break; case CC_BITMAP: switch (context->write_format) diff --git a/src/lib_ccx/lib_ccx.c b/src/lib_ccx/lib_ccx.c index 40236651..a3288e7f 100644 --- a/src/lib_ccx/lib_ccx.c +++ b/src/lib_ccx/lib_ccx.c @@ -413,7 +413,7 @@ struct encoder_ctx *update_encoder_list_cinfo(struct lib_ccx_ctx *ctx, struct ca enc_ctx = init_encoder(&ccx_options.enc_cfg); if (!enc_ctx) { - freep(ccx_options.enc_cfg.output_filename); + freep(&ccx_options.enc_cfg.output_filename); return NULL; }