Explorar o código

Fix delete of malloc'ed memory

Ben Payne %!s(int64=11) %!d(string=hai) anos
pai
achega
81e7dafb94
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      Engine/source/console/consoleInternal.cpp

+ 2 - 2
Engine/source/console/consoleInternal.cpp

@@ -880,7 +880,7 @@ void Namespace::Entry::clear()
    // Clean up usage strings generated for script functions.
    if( ( mType == Namespace::Entry::ConsoleFunctionType ) && mUsage )
    {
-      delete mUsage;
+      dFree(mUsage);
       mUsage = NULL;
    }
 }
@@ -906,7 +906,7 @@ Namespace::~Namespace()
    clearEntries();
    if( mUsage && mCleanUpUsage )
    {
-      delete mUsage;
+      dFree(mUsage);
       mUsage = NULL;
       mCleanUpUsage = false;
    }