From: Jouni Malinen Date: Sun, 2 Mar 2014 11:57:11 +0000 (+0200) Subject: trace: Fix memory use on no-function name path X-Git-Tag: hostap_2_2~698 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa0a9f536cad17763665239e43321d649c5c0bed;p=thirdparty%2Fhostap.git trace: Fix memory use on no-function name path bfd_demangle() call could be skipped if data.function == NULL. Make sure the already freed aname pointer cannot be used again in such a case. Signed-off-by: Jouni Malinen --- diff --git a/src/utils/trace.c b/src/utils/trace.c index 6795d417d..94440f2f9 100644 --- a/src/utils/trace.c +++ b/src/utils/trace.c @@ -187,6 +187,7 @@ static void wpa_trace_bfd_addr(void *pc) wpa_printf(MSG_INFO, " %s() %s:%u", name, filename, data.line); free(aname); + aname = NULL; data.found = bfd_find_inliner_info(abfd, &data.filename, &data.function, &data.line);