diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-06-21 18:15:45 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-06-22 10:01:48 -0300 |
commit | 0b04b3dcdfb9aeb0e83c8ca322bf0830ee51ce38 (patch) | |
tree | 183b7008d41ce1f5feb7c840a2540d93a830e9e6 /tools/perf/builtin-kvm.c | |
parent | 89c7cb2cad5e5e3675df3ba1c12fe2f64dc691d6 (diff) | |
download | linux-stable-0b04b3dcdfb9aeb0e83c8ca322bf0830ee51ce38.tar.gz linux-stable-0b04b3dcdfb9aeb0e83c8ca322bf0830ee51ce38.tar.bz2 linux-stable-0b04b3dcdfb9aeb0e83c8ca322bf0830ee51ce38.zip |
perf evlist: Destructors should accept NULL
And do nothing, just like free(), to avoid having to test it in callers,
usually in error paths.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-mexbavy0ft387j5w89t365eu@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-kvm.c')
-rw-r--r-- | tools/perf/builtin-kvm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 6487c06d2708..ad46e91abec5 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c @@ -1429,8 +1429,7 @@ out: if (kvm->session) perf_session__delete(kvm->session); kvm->session = NULL; - if (kvm->evlist) - perf_evlist__delete(kvm->evlist); + perf_evlist__delete(kvm->evlist); return err; } |