perf python: Reference Py_None before returning it
authorPetr Machata <petrm@mellanox.com>
Wed, 21 Mar 2018 23:57:32 +0000 (00:57 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 23 Mar 2018 19:45:20 +0000 (16:45 -0300)
commit83428f2fad48e16fddff0cb445cb4fedf5afe4ab
treeaddf1890e855ad68222a8eb2111c6867581cc640
parent751b1783da784299b0509adb6a9cd3024cc4f837
perf python: Reference Py_None before returning it

Python None objects are handled just like all the other objects with
respect to their reference counting. Before returning Py_None, its
reference count thus needs to be bumped.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Petr Machata <petrm@mellanox.com>
Link: http://lkml.kernel.org/r/b1e565ecccf68064d8d54f37db5d028dda8fa522.1521675563.git.petrm@mellanox.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/python.c