projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
868a832
)
perf script: Remove some bogus error handling
author
Dan Carpenter
<
[email protected]
>
Sat, 22 Jul 2017 07:36:10 +0000
(10:36 +0300)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Wed, 26 Jul 2017 01:43:17 +0000
(22:43 -0300)
If script_desc__new() fails then the current code has a NULL
dereference. We don't actually need to do any cleanup, we can just
return NULL.
Signed-off-by: Dan Carpenter <
[email protected]
>
Cc: Alexander Shishkin <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc:
[email protected]
Link:
http://lkml.kernel.org/r/20170722073610.nnsyiwdcfl6bhn4t@mwanda
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/builtin-script.c
patch
|
blob
|
history
diff --git
a/tools/perf/builtin-script.c
b/tools/perf/builtin-script.c
index d430ff42208ab9dc06a26d1bffe175f9fdd4f931..378f76cdf923d660f0d9b8448139d9a3e91169f0 100644
(file)
--- a/
tools/perf/builtin-script.c
+++ b/
tools/perf/builtin-script.c
@@
-2199,16
+2199,11
@@
static struct script_desc *script_desc__findnew(const char *name)
s = script_desc__new(name);
if (!s)
-
goto out_delete_desc
;
+
return NULL
;
script_desc__add(s);
return s;
-
-out_delete_desc:
- script_desc__delete(s);
-
- return NULL;
}
static const char *ends_with(const char *str, const char *suffix)