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 @@ -993,8 +993,10 @@ int cmd_inject(int argc, const char **argv)
993993
994994 data .path = inject .input_name ;
995995 inject .session = perf_session__new (& data , inject .output .is_pipe , & inject .tool );
996- if (IS_ERR (inject .session ))
997- return PTR_ERR (inject .session );
996+ if (IS_ERR (inject .session )) {
997+ ret = PTR_ERR (inject .session );
998+ goto out_close_output ;
999+ }
9981000
9991001 if (zstd_init (& (inject .session -> zstd_data ), 0 ) < 0 )
10001002 pr_warning ("Decompression initialization failed.\n" );
@@ -1036,6 +1038,8 @@ int cmd_inject(int argc, const char **argv)
10361038out_delete :
10371039 zstd_fini (& (inject .session -> zstd_data ));
10381040 perf_session__delete (inject .session );
1041+ out_close_output :
1042+ perf_data__close (& inject .output );
10391043 free (inject .itrace_synth_opts .vm_tm_corr_args );
10401044 return ret ;
10411045}
You can’t perform that action at this time.
0 commit comments