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
This commit is contained in:
committed by
Vadim Zeitlin
parent
6e6e1cf25b
commit
a7f31db8cd
@@ -351,7 +351,7 @@ void wxListBase::DoDeleteNode(wxNodeBase *node)
|
|||||||
// free node's data
|
// free node's data
|
||||||
if ( m_keyType == wxKEY_STRING )
|
if ( m_keyType == wxKEY_STRING )
|
||||||
{
|
{
|
||||||
free(node->m_key.string);
|
wxDELETE(node->m_key.string);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_destroy )
|
if ( m_destroy )
|
||||||
|
Reference in New Issue
Block a user