OSDN Git Service

perf trace: 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:54:32 +0000 (09:54 -0300)
commit9997d5dd177c52017fa0541bf236a4232c8148e6
treec73666cc8d58e15cba5566b0896738f1ff7cced2
parent789eae7f203edc1301d7122ad9b3046e7c56937c
perf trace: 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-trace.c