src/video/x11/SDL_x11events.c


Log

Author Commit Date CI Message
Sam Lantinga f6953cf4 2014-04-17T20:02:11 Fixed bug 2502 - Memory leak inside SDL_x11events.c -> X11_DispatchEvent(_THIS) bojko_1000 Code @566: if (data->xwindow) { Atom _net_frame_extents = X11_XInternAtom(display, "_NET_FRAME_EXTENTS", 0); Atom type = None; int format; unsigned long nitems = 0, bytes_after; unsigned char *property; X11_XGetWindowProperty(display, data->xwindow, _net_frame_extents, 0, 16, 0, XA_CARDINAL, &type, &format, &nitems, &bytes_after, &property); if (type != None && nitems == 4) { border_left = ((long*)property)[0]; border_right = ((long*)property)[1]; border_top = ((long*)property)[2]; border_bottom = ((long*)property)[3]; } } Code after _the fix_: if (data->xwindow) { Atom _net_frame_extents = X11_XInternAtom(display, "_NET_FRAME_EXTENTS", 0); Atom type = None; int format; unsigned long nitems = 0, bytes_after; unsigned char *property; X11_XGetWindowProperty(display, data->xwindow, _net_frame_extents, 0, 16, 0, XA_CARDINAL, &type, &format, &nitems, &bytes_after, &property); if (type != None && nitems == 4) { border_left = ((long*)property)[0]; border_right = ((long*)property)[1]; border_top = ((long*)property)[2]; border_bottom = ((long*)property)[3]; } X11_XFree(property); } I have found that leak with valgrind.
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.