From a6b2e9255fff6bf079115ba8aa7fa6dd9069cfed Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Thu, 1 Oct 2009 16:52:05 +0000 Subject: Fixed mismatching malloc/free, and plugged a memleak. svn-id: r44526 --- backends/platform/wii/osystem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'backends/platform') diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp index 9a83c9e1c1..00547d55d6 100644 --- a/backends/platform/wii/osystem.cpp +++ b/backends/platform/wii/osystem.cpp @@ -211,7 +211,7 @@ OSystem::MutexRef OSystem_Wii::createMutex() { if (res) { printf("ERROR creating mutex\n"); - delete mutex; + free(mutex); return NULL; } @@ -237,6 +237,8 @@ void OSystem_Wii::deleteMutex(MutexRef mutex) { if (res) printf("ERROR destroying mutex %p (%d)\n", mutex, res); + + free(mutex); } void OSystem_Wii::setWindowCaption(const char *caption) { -- cgit v1.2.3