Message ID | 173643297743.1514810.2408159540454241947.stgit@devnote2 (mailing list archive) |
---|---|
State | Queued |
Commit | 30c8fd31c571db486a5331a92d03eb60a0fb277c |
Headers | show |
Series | tracing/probes: Cleanup with guard and __free for kprobe and fprobe | expand |
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index 263fac44d3ca..fb9d4dffa66e 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c @@ -940,8 +940,10 @@ static int __trace_kprobe_create(int argc, const char *argv[]) } /* a symbol specified */ symbol = kstrdup(argv[1], GFP_KERNEL); - if (!symbol) - return -ENOMEM; + if (!symbol) { + ret = -ENOMEM; + goto error; + } tmp = strchr(symbol, '%'); if (tmp) {