File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -2635,6 +2635,7 @@ static int build_cl_output(char *cl_sort, bool no_source)
2635
2635
bool add_sym = false;
2636
2636
bool add_dso = false;
2637
2637
bool add_src = false;
2638
+ int ret = 0 ;
2638
2639
2639
2640
if (!buf )
2640
2641
return - ENOMEM ;
@@ -2653,7 +2654,8 @@ static int build_cl_output(char *cl_sort, bool no_source)
2653
2654
add_dso = true;
2654
2655
} else if (strcmp (tok , "offset" )) {
2655
2656
pr_err ("unrecognized sort token: %s\n" , tok );
2656
- return - EINVAL ;
2657
+ ret = - EINVAL ;
2658
+ goto err ;
2657
2659
}
2658
2660
}
2659
2661
@@ -2676,13 +2678,15 @@ static int build_cl_output(char *cl_sort, bool no_source)
2676
2678
add_sym ? "symbol," : "" ,
2677
2679
add_dso ? "dso," : "" ,
2678
2680
add_src ? "cl_srcline," : "" ,
2679
- "node" ) < 0 )
2680
- return - ENOMEM ;
2681
+ "node" ) < 0 ) {
2682
+ ret = - ENOMEM ;
2683
+ goto err ;
2684
+ }
2681
2685
2682
2686
c2c .show_src = add_src ;
2683
-
2687
+ err :
2684
2688
free (buf );
2685
- return 0 ;
2689
+ return ret ;
2686
2690
}
2687
2691
2688
2692
static int setup_coalesce (const char * coalesce , bool no_source )
You can’t perform that action at this time.
0 commit comments