Fix mismatched deallocation

The strings are allocated via strdup() -> malloc(), and need to be freed
with free(), the array is allocated with operator new[], and needs to be
deallocated with operator delete[].
This commit is contained in:
Simon Richter 2023-01-13 11:36:33 +01:00
parent bd6d0b6cb6
commit dc9aaf7844
1 changed files with 2 additions and 2 deletions

View File

@ -138,10 +138,10 @@ PGM_BASE::~PGM_BASE()
for( int n = 0; n < m_argcUtf8; n++ )
{
delete m_argvUtf8[n];
free( m_argvUtf8[n] );
}
delete m_argvUtf8;
delete[] m_argvUtf8;
}