Fixed leak of display name.

This commit is contained in:
Camilla Berglund 2014-03-10 18:41:52 +01:00
parent 43095307da
commit 5c23071a81
2 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,7 @@ The following dependencies are needed by the examples and test programs:
recorders to fail recorders to fail
- [Cocoa] Bugfix: Some Core Foundation objects were leaked during joystick - [Cocoa] Bugfix: Some Core Foundation objects were leaked during joystick
enumeration enumeration
- [Cocoa] Bugfix: One copy of each display name string was leaked
- [Win32] Enabled generation of pkg-config file for MinGW - [Win32] Enabled generation of pkg-config file for MinGW
- [Win32] Bugfix: Failure to load winmm or its functions was not reported to - [Win32] Bugfix: Failure to load winmm or its functions was not reported to
the error callback the error callback

View File

@ -308,6 +308,8 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
monitors[found] = _glfwAllocMonitor(name, size.width, size.height); monitors[found] = _glfwAllocMonitor(name, size.width, size.height);
monitors[found]->ns.displayID = displays[i]; monitors[found]->ns.displayID = displays[i];
free(name);
for (j = 0; j < [screens count]; j++) for (j = 0; j < [screens count]; j++)
{ {
NSScreen* screen = [screens objectAtIndex:j]; NSScreen* screen = [screens objectAtIndex:j];