trace: Add active reference tracking

This WPA_TRACE=y additions allows components to register active references
to memory that has been provided to them as a pointer. If such an actively
referenced memory area is freed, tracer will report this as an error and
backtraces of both the invalid free and the location where this pointer
was marked referenced are shown.
This commit is contained in:
Jouni Malinen 2009-12-22 01:11:15 +02:00
parent a698d28415
commit a6ff0e0810
4 changed files with 106 additions and 3 deletions

View file

@ -407,6 +407,7 @@ void os_free(void *ptr)
dl_list_del(&a->list);
a->magic = FREED_MAGIC;
wpa_trace_check_ref(ptr);
free(a);
}