diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-04-12 09:50:08 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2023-04-12 10:15:27 -0300 |
commit | 2e384400549be734795072b1d904880efc0db2f9 (patch) | |
tree | acb21f9a49e1cc6c7f07f4021e0a95cc713a32cc /tools/perf | |
parent | 9ccbc21166ce149c5f7429cad22f9073d3fab0b1 (diff) | |
download | linux-stable-2e384400549be734795072b1d904880efc0db2f9.tar.gz linux-stable-2e384400549be734795072b1d904880efc0db2f9.tar.bz2 linux-stable-2e384400549be734795072b1d904880efc0db2f9.zip |
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>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/arch/arm64/util/arm-spe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c index d4c234076541..ef497a29e814 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -479,7 +479,7 @@ static void arm_spe_recording_free(struct auxtrace_record *itr) struct arm_spe_recording *sper = container_of(itr, struct arm_spe_recording, itr); - free(sper->wrapped); + zfree(&sper->wrapped); free(sper); } |