File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -565,8 +565,10 @@ void print_file_report(struct lib_ccx_ctx *ctx)
565565 struct lib_cc_decode * dec_ctx = NULL ;
566566 struct ccx_demuxer * demux_ctx = ctx -> demux_ctx ;
567567 const char * report_fmt = ccx_options .report_format ;
568+ int is_json = 0 ;
568569 if (report_fmt && strcasecmp (report_fmt , "json" ) == 0 )
569570 {
571+ is_json = 1 ;
570572 print_file_report_json (ctx );
571573 goto cleanup ;
572574 }
@@ -733,7 +735,9 @@ void print_file_report(struct lib_ccx_ctx *ctx)
733735 }
734736
735737cleanup :
736- freep (& ctx -> freport .data_from_608 );
737- memset (& ctx -> freport , 0 , sizeof (struct file_report ));
738+ if (is_json ){
739+ freep (& ctx -> freport .data_from_608 );
740+ memset (& ctx -> freport , 0 , sizeof (struct file_report ));
741+ }
738742#undef Y_N
739743}
You can’t perform that action at this time.
0 commit comments