From bbf028becce34d35b498424c707d639df4942f37 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 31 Mar 2018 17:52:27 -0600 Subject: [PATCH] dthelp/htag/malloc: coverity CID 86955; use after free --- cde/programs/dthelp/parser.ccdf/htag/util/malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cde/programs/dthelp/parser.ccdf/htag/util/malloc.c b/cde/programs/dthelp/parser.ccdf/htag/util/malloc.c index 82012828..416f28ba 100644 --- a/cde/programs/dthelp/parser.ccdf/htag/util/malloc.c +++ b/cde/programs/dthelp/parser.ccdf/htag/util/malloc.c @@ -93,7 +93,6 @@ void m_free(block, msg) #if defined(MSDOS) if (m_heapchk) m_heapdump() ; #endif - free(block) ; if (m_malftrace) { #if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) sprintf(buffer, "%5x:%5x", @@ -107,6 +106,7 @@ void m_free(block, msg) m_trace(msg) ; m_trace("\n") ; } + free(block) ; #if defined(MSDOS) if (m_heapchk) m_heapdump() ; #endif -- 2.25.1