trace: Free symbols on program exit

This makes valgrind memleak checks with CONFIG_WPA_TRACE=y somewhat
cleaner.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
master
Jouni Malinen 8 years ago committed by Jouni Malinen
parent 8bcf8de827
commit 6136d43b8e

@ -372,6 +372,7 @@ void os_program_deinit(void)
if (total)
wpa_printf(MSG_INFO, "MEMLEAK: total %lu bytes",
(unsigned long) total);
wpa_trace_deinit();
#endif /* WPA_TRACE */
}

@ -366,4 +366,11 @@ void wpa_trace_check_ref(const void *addr)
}
}
void wpa_trace_deinit(void)
{
free(syms);
syms = NULL;
}
#endif /* WPA_TRACE */

@ -66,4 +66,6 @@ void wpa_trace_dump_funcname(const char *title, void *pc);
#endif /* WPA_TRACE_BFD */
void wpa_trace_deinit(void);
#endif /* TRACE_H */

Loading…
Cancel
Save