diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-12-26 13:54:57 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-12-26 13:58:52 -0500 |
commit | f5385650c02cd4373c4124c8a8fac3b5f9851e7f (patch) | |
tree | 93d2a59ebf378289abf9853ab2da49c70ac80633 /tools/perf/builtin-kvm.c | |
parent | 6dd601354f14b5cd7a0a4103811e52ccec22ac53 (diff) |
perf tools: No need to test against NULL before calling free()
Its perfectly fine to call free(NULL), so no need to clutter the source
code with all those superfluous testing.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-uux5wpvevlerd42gqer13e7n@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 | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 5a80da6ba413..a6ec1052c291 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c | |||
@@ -1158,9 +1158,7 @@ out: | |||
1158 | if (kvm->timerfd >= 0) | 1158 | if (kvm->timerfd >= 0) |
1159 | close(kvm->timerfd); | 1159 | close(kvm->timerfd); |
1160 | 1160 | ||
1161 | if (pollfds) | 1161 | free(pollfds); |
1162 | free(pollfds); | ||
1163 | |||
1164 | return err; | 1162 | return err; |
1165 | } | 1163 | } |
1166 | 1164 | ||