perf arm-spe: 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 13:15:27 +0000 (10:15 -0300)
commit2e384400549be734795072b1d904880efc0db2f9
treeacb21f9a49e1cc6c7f07f4021e0a95cc713a32cc
parent9ccbc21166ce149c5f7429cad22f9073d3fab0b1
perf arm-spe: 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/arch/arm64/util/arm-spe.c