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)
993
993
994
994
data .path = inject .input_name ;
995
995
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
+ }
998
1000
999
1001
if (zstd_init (& (inject .session -> zstd_data ), 0 ) < 0 )
1000
1002
pr_warning ("Decompression initialization failed.\n" );
@@ -1036,6 +1038,8 @@ int cmd_inject(int argc, const char **argv)
1036
1038
out_delete :
1037
1039
zstd_fini (& (inject .session -> zstd_data ));
1038
1040
perf_session__delete (inject .session );
1041
+ out_close_output :
1042
+ perf_data__close (& inject .output );
1039
1043
free (inject .itrace_synth_opts .vm_tm_corr_args );
1040
1044
return ret ;
1041
1045
}
You can’t perform that action at this time.
0 commit comments