Message ID | 20220425063739.3859998-1-keitasuzuki.park@sslab.ics.keio.ac.jp |
---|---|
State | Accepted |
Commit | 99696a2592bca641eb88cc9a80c90e591afebd0f |
Headers | show |
Series | [V2] tracing: Fix potential double free in create_var_ref() | expand |
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index 44db5ba9cabb..a0e41906d9ce 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -2093,8 +2093,11 @@ static int init_var_ref(struct hist_field *ref_field, return err; free: kfree(ref_field->system); + ref_field->system = NULL; kfree(ref_field->event_name); + ref_field->event_name = NULL; kfree(ref_field->name); + ref_field->name = NULL; goto out; }