projects
/
platform
/
core
/
csapi
/
opentk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02c9f47
)
[Mac] Do not call CFRelease on HID properties
author
thefiddler
<stapostol@gmail.com>
Sun, 5 Jan 2014 20:27:34 +0000
(21:27 +0100)
committer
thefiddler
<stapostol@gmail.com>
Sun, 5 Jan 2014 20:27:34 +0000
(21:27 +0100)
HID properties are callee-owned and should not be released by the
caller. Fixes crash (memory corruption) on device hot plugging.
Source/OpenTK/Platform/MacOS/HIDInput.cs
patch
|
blob
|
history
diff --git
a/Source/OpenTK/Platform/MacOS/HIDInput.cs
b/Source/OpenTK/Platform/MacOS/HIDInput.cs
index
382e1f9
..
6deb0b9
100755
(executable)
--- a/
Source/OpenTK/Platform/MacOS/HIDInput.cs
+++ b/
Source/OpenTK/Platform/MacOS/HIDInput.cs
@@
-408,7
+408,6
@@
namespace OpenTK.Platform.MacOS
CFStringRef name_ref = NativeMethods.IOHIDDeviceGetProperty(device, NativeMethods.IOHIDProductKey);
string name = CF.CFStringGetCString(name_ref);
- CF.CFRelease(name_ref);
List<int> button_elements = new List<int>();
CFArray element_array = new CFArray(element_array_ref);