Skip to content

Commit 4bded7a

Browse files
beaubelgraverostedt
authored andcommitted
tracing/user_events: Fix call print_fmt leak
If user_event_trace_register() fails within user_event_parse() the call's print_fmt member is not freed. Add kfree call to fix this. Link: https://lkml.kernel.org/r/[email protected] Fixes: aa3b2b4 ("user_events: Add print_fmt generation support for basic types") Signed-off-by: Beau Belgrave <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent bd604f3 commit 4bded7a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/trace/trace_events_user.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,6 +1359,7 @@ static int user_event_parse(struct user_event_group *group, char *name,
13591359
put_user:
13601360
user_event_destroy_fields(user);
13611361
user_event_destroy_validators(user);
1362+
kfree(user->call.print_fmt);
13621363
kfree(user);
13631364
return ret;
13641365
}

0 commit comments

Comments
 (0)