diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-09-01 12:04:09 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-27 10:57:21 +0200 |
commit | 45a521cba61051409ea2b932104ab6767e7b68b4 (patch) | |
tree | aeb11b7085d22d04bf477fa82be0c084bf71b12e /kernel | |
parent | 78d88643d218fccb0fcf7fa957e785d4048e35cb (diff) | |
download | linux-stable-45a521cba61051409ea2b932104ab6767e7b68b4.tar.gz linux-stable-45a521cba61051409ea2b932104ab6767e7b68b4.tar.bz2 linux-stable-45a521cba61051409ea2b932104ab6767e7b68b4.zip |
ftrace: Fix selftest goto location on error
commit 46320a6acc4fb58f04bcf78c4c942cc43b20f986 upstream.
In the second iteration of trace_selftest_ops(), the error goto label is
wrong in the case where trace_selftest_test_global_cnt is off. In the
case of error, it leaks the dynamic ops that was allocated.
Fixes: 95950c2e ("ftrace: Add self-tests for multiple function trace users")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_selftest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index b0f86ea77881..ca70d11b8aa7 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace/trace_selftest.c @@ -272,7 +272,7 @@ static int trace_selftest_ops(struct trace_array *tr, int cnt) goto out_free; if (cnt > 1) { if (trace_selftest_test_global_cnt == 0) - goto out; + goto out_free; } if (trace_selftest_test_dyn_cnt == 0) goto out_free; |