perf symbol: Use zfree() to reduce chances of use after free
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 12 Apr 2023 12:50:08 +0000 (09:50 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 12 Apr 2023 12:57:16 +0000 (09:57 -0300)
commitd729163d0641d8b4c50fdca1b2b9d5d24d9d376d
tree178a83698e087e242c5e26d3bf17535172b9ac40
parentb20c63084eb2c591006109aefbdeb3cad7a57d23
perf symbol: 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.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol-elf.c