Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+1 -1
+1 -1
tools/perf/arch/arm64/util/arm-spe.c
··· 479 479 struct arm_spe_recording *sper = 480 480 container_of(itr, struct arm_spe_recording, itr); 481 481 482 - free(sper->wrapped); 482 + zfree(&sper->wrapped); 483 483 free(sper); 484 484 } 485 485