summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlioncash <mathew1800@gmail.com>2014-08-06 12:30:45 -0400
committerlioncash <mathew1800@gmail.com>2014-08-06 12:34:40 -0400
commitf21d50e104f3bc2e2e2b6ab0263ca728ff8be3e9 (patch)
tree618c9e10147e76bd6ccdf4a4f50cb3fabe522eb1
parent62cc22ac11d1b477b0a5a5d4baeecf1f5e8906b9 (diff)
Core: Fix a leak on OSX that could occur in IOdarwin.mm
If a bluetooth connection isn't able to be opened with a Wiimote, then a memory leak would occur as we don't release cbt
-rw-r--r--Source/Core/Core/HW/WiimoteReal/IOdarwin.mm1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/Core/Core/HW/WiimoteReal/IOdarwin.mm b/Source/Core/Core/HW/WiimoteReal/IOdarwin.mm
index 637724acec..d3e10696f4 100644
--- a/Source/Core/Core/HW/WiimoteReal/IOdarwin.mm
+++ b/Source/Core/Core/HW/WiimoteReal/IOdarwin.mm
@@ -221,6 +221,7 @@ bool Wiimote::ConnectInternal()
{
ERROR_LOG(WIIMOTE, "Unable to open Bluetooth connection to wiimote %i: %x",
index + 1, ret);
+ [cbt release];
return false;
}