BUGS.txt
author Sam Lantinga <slouken@libsdl.org>
Thu, 17 Apr 2014 20:02:11 -0700
changeset 8706 0c9660fdf9bf
parent 7238 daff4d9cedc6
child 10236 a9231c55e5cc
permissions -rw-r--r--
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.
     1 
     2 Bugs are now managed in the SDL bug tracker, here:
     3 
     4     http://bugzilla.libsdl.org/
     5 
     6 You may report bugs there, and search to see if a given issue has already
     7  been reported, discussed, and maybe even fixed.
     8 
     9 
    10 You may also find help on the SDL mailing list. Subscription information:
    11 
    12     http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
    13 
    14 Bug reports are welcome here, but we really appreciate if you use Bugzilla, as
    15  bugs discussed on the mailing list may be forgotten or missed.
    16