projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
tracing/user_events: Fix memory leak in user_event_create()
[platform/kernel/linux-starfive.git]
/
kernel
/
trace
/
trace_events_user.c
diff --git
a/kernel/trace/trace_events_user.c
b/kernel/trace/trace_events_user.c
index
ae78c2d
..
539b08a
100644
(file)
--- a/
kernel/trace/trace_events_user.c
+++ b/
kernel/trace/trace_events_user.c
@@
-1100,8
+1100,10
@@
static int user_event_create(const char *raw_command)
group = current_user_event_group();
- if (!group)
+ if (!group) {
+ kfree(name);
return -ENOENT;
+ }
mutex_lock(&group->reg_mutex);