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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 9ccbc211
...@@ -479,7 +479,7 @@ static void arm_spe_recording_free(struct auxtrace_record *itr) ...@@ -479,7 +479,7 @@ static void arm_spe_recording_free(struct auxtrace_record *itr)
struct arm_spe_recording *sper = struct arm_spe_recording *sper =
container_of(itr, struct arm_spe_recording, itr); container_of(itr, struct arm_spe_recording, itr);
free(sper->wrapped); zfree(&sper->wrapped);
free(sper); free(sper);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment