From a7f31db8cd583b9ea72cf42dfb46702099146b6d Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 23 Dec 2019 13:15:29 +0100 Subject: [PATCH] Fix mismatching delete in wxList code Use delete, not free, to free a pointer allocated with new. Closes https://github.com/wxWidgets/wxWidgets/pull/1686 --- src/common/list.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/list.cpp b/src/common/list.cpp index 64bfbcb9a9..3b51fce4ff 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -351,7 +351,7 @@ void wxListBase::DoDeleteNode(wxNodeBase *node) // free node's data if ( m_keyType == wxKEY_STRING ) { - free(node->m_key.string); + wxDELETE(node->m_key.string); } if ( m_destroy )