Fix new/free mismatch
authorSimon Hausmann <simon.hausmann@digia.com>
Sat, 8 Dec 2012 04:18:22 +0000 (05:18 +0100)
committerLars Knoll <lars.knoll@digia.com>
Sat, 8 Dec 2012 16:18:17 +0000 (17:18 +0100)
Earlier patch replaced new with malloc, so when free'ing we also
have to use free() instead of delete.

Change-Id: I353494d88d4de91eb115b7c3dc41fcc556ff6aeb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
qv4mm.cpp

index 8fe3815..60c6180 100644 (file)
--- a/qv4mm.cpp
+++ b/qv4mm.cpp
@@ -77,7 +77,7 @@ struct MemoryManager::Data
     ~Data()
     {
         for (QLinkedList<QPair<char *, std::size_t> >::iterator i = heapChunks.begin(), ei = heapChunks.end(); i != ei; ++i)
-            delete[] i->first;
+            free(i->first);
     }
 };