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:
parent
bd6d0b6cb6
commit
dc9aaf7844
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue