Fix segfault (#1192)

This commit is contained in:
Nils ANDRÉ-CHANG 2020-01-18 20:15:40 +00:00 committed by Carlos Fernandez Sanz
parent 676be1f193
commit 84ba7c5238
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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;
}