perf list: 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:55:44 +0000 (09:55 -0300)
commitb20c63084eb2c591006109aefbdeb3cad7a57d23
treee173665b927b8b8352606d8cf17c98a1919c0300
parent190de75481439205f3a9362bd0511fd48ad1a718
perf list: 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/builtin-list.c