aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/intel-pt-events.py
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2023-04-12 09:50:08 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-04-12 10:07:06 -0300
commit25feb605fe3b2674142d084379e0737a99945aba (patch)
tree18e1633bd8d896cdc0205a7bd8863c0a7a88ad16 /tools/perf/scripts/python/intel-pt-events.py
parenta77f8184a07cbe81cdee30582640ed1b412705fc (diff)
downloadlinux-25feb605fe3b2674142d084379e0737a99945aba.tar.gz
linux-25feb605fe3b2674142d084379e0737a99945aba.tar.bz2
linux-25feb605fe3b2674142d084379e0737a99945aba.zip
perf parse-events: Use zfree() to reduce chances of use after free
Do defensive programming by using zfree() to initialize freed pointers to NULL, so that eventual use after free result in a NULL pointer deref instead of more subtle behaviour. Also remove one NULL test before free(), as it accepts a NULL arg and we get one line shaved not doing it explicitely. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
0 files changed, 0 insertions, 0 deletions