OSDN Git Service

perf metricgroups: 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:17:58 +0000 (10:17 -0300)
commit11ff9bcd7dfeefa6a9a9fcd4c7775b8066c46a31
tree5b78b9520a9665fca6ace803eb7a0af2f25382a4
parent2e384400549be734795072b1d904880efc0db2f9
perf metricgroups: 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.

This file already used zfree() in other places, so this just plugs some
leftovers.

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