Fix new/malloc/delete/free mismatches in Dictionary code

This commit is contained in:
Jon Siwek 2020-08-05 16:48:31 -07:00 committed by Tim Wojtulewicz
parent d566b8ca31
commit 37d3cfbd44
2 changed files with 4 additions and 4 deletions

View file

@ -90,7 +90,7 @@ public:
{
memcpy(key_here, arg_key, key_size);
if ( ! copy_key )
delete (char*)arg_key; //own the arg_key, now don't need it.
delete [] (char*)arg_key; //own the arg_key, now don't need it.
}
else
{
@ -123,7 +123,7 @@ public:
void Clear()
{
if( key_size > 8 )
delete key;
delete [] key;
SetEmpty();
}