README-hg.txt
author Sam Lantinga <slouken@libsdl.org>
Thu, 17 Apr 2014 20:02:11 -0700
changeset 8706 0c9660fdf9bf
parent 7241 28602f5ca96d
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 The latest development version of SDL is available via Mercurial.
     2 Mercurial allows you to get up-to-the-minute fixes and enhancements;
     3 as a developer works on a source tree, you can use "hg" to mirror that
     4 source tree instead of waiting for an official release. Please look
     5 at the Mercurial website ( http://mercurial.selenic.com/ ) for more
     6 information on using hg, where you can also download software for
     7 Mac OS X, Windows, and Unix systems.
     8 
     9   hg clone http://hg.libsdl.org/SDL
    10 
    11 If you are building SDL with an IDE, you will need to copy the file
    12 include/SDL_config.h.default to include/SDL_config.h before building.
    13 
    14 If you are building SDL via configure, you will need to run autogen.sh
    15 before running configure.
    16 
    17 There is a web interface to the subversion repository at:
    18 
    19 	http://hg.libsdl.org/SDL/
    20 
    21 There is an RSS feed available at that URL, for those that want to
    22 track commits in real time.
    23