diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_events_filter.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 85ad6a8939ad..22c29984fe0e 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c | |||
@@ -1079,9 +1079,10 @@ int apply_event_filter(struct ftrace_event_call *call, char *filter_string) | |||
1079 | return 0; | 1079 | return 0; |
1080 | } | 1080 | } |
1081 | 1081 | ||
1082 | err = -ENOMEM; | ||
1082 | ps = kzalloc(sizeof(*ps), GFP_KERNEL); | 1083 | ps = kzalloc(sizeof(*ps), GFP_KERNEL); |
1083 | if (!ps) | 1084 | if (!ps) |
1084 | return -ENOMEM; | 1085 | goto out_unlock; |
1085 | 1086 | ||
1086 | filter_disable_preds(call); | 1087 | filter_disable_preds(call); |
1087 | replace_filter_string(call->filter, filter_string); | 1088 | replace_filter_string(call->filter, filter_string); |
@@ -1101,7 +1102,7 @@ out: | |||
1101 | filter_opstack_clear(ps); | 1102 | filter_opstack_clear(ps); |
1102 | postfix_clear(ps); | 1103 | postfix_clear(ps); |
1103 | kfree(ps); | 1104 | kfree(ps); |
1104 | 1105 | out_unlock: | |
1105 | mutex_unlock(&filter_mutex); | 1106 | mutex_unlock(&filter_mutex); |
1106 | 1107 | ||
1107 | return err; | 1108 | return err; |
@@ -1123,9 +1124,10 @@ int apply_subsystem_event_filter(struct event_subsystem *system, | |||
1123 | return 0; | 1124 | return 0; |
1124 | } | 1125 | } |
1125 | 1126 | ||
1127 | err = -ENOMEM; | ||
1126 | ps = kzalloc(sizeof(*ps), GFP_KERNEL); | 1128 | ps = kzalloc(sizeof(*ps), GFP_KERNEL); |
1127 | if (!ps) | 1129 | if (!ps) |
1128 | return -ENOMEM; | 1130 | goto out_unlock; |
1129 | 1131 | ||
1130 | filter_free_subsystem_preds(system); | 1132 | filter_free_subsystem_preds(system); |
1131 | replace_filter_string(system->filter, filter_string); | 1133 | replace_filter_string(system->filter, filter_string); |
@@ -1145,7 +1147,7 @@ out: | |||
1145 | filter_opstack_clear(ps); | 1147 | filter_opstack_clear(ps); |
1146 | postfix_clear(ps); | 1148 | postfix_clear(ps); |
1147 | kfree(ps); | 1149 | kfree(ps); |
1148 | 1150 | out_unlock: | |
1149 | mutex_unlock(&filter_mutex); | 1151 | mutex_unlock(&filter_mutex); |
1150 | 1152 | ||
1151 | return err; | 1153 | return err; |