Add memory allocation analyzer to verify OS wrapper use
WPA_TRACE=y builds will now verify that memory allocation in done consistently using os_{zalloc,malloc,realloc,strdup,free} (i.e., no mixing of os_* functions and unwrapper functions). In addition, some common memory allocation issues (double-free, memory leaks, etc.) are detected automatically.
This commit is contained in:
parent
80d77c31ff
commit
fb4baa688b
5 changed files with 174 additions and 23 deletions
|
@ -29,7 +29,7 @@ void wpa_trace_dump_func(const char *title, void **btrace, int btrace_num)
|
|||
for (i = 0; i < btrace_num; i++)
|
||||
wpa_printf(MSG_INFO, "[%d]: %p: %s",
|
||||
i, btrace[i], sym ? sym[i] : "");
|
||||
os_free(sym);
|
||||
free(sym);
|
||||
wpa_printf(MSG_INFO, "WPA_TRACE: %s - END", title);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue