# HG changeset patch # User Sam Lantinga # Date 1084729232 0 # Node ID 07def9d033158d43e693e71e59bd75d86290b273 # Parent b4b64bb88f2fccf29ff38677be4799e126eacb77 Date: Sun, 28 Mar 2004 16:38:32 +1200 From: Paul Eggleton Subject: [SDL] Possible memory leak in SDL 1.2.7 Taking a look at this function X11_CreateWMCursor and its companion X11_FreeWMCursor (in src/video/x11/SDL_x11mouse.c), I can see that X11_CreateWMCursor is making several calls to XCreatePixmap, but there are no corresponding calls in X11_FreeWMCursor to XFreePixmap. diff -r b4b64bb88f2f -r 07def9d03315 src/video/x11/SDL_x11mouse.c --- a/src/video/x11/SDL_x11mouse.c Sun May 16 17:19:48 2004 +0000 +++ b/src/video/x11/SDL_x11mouse.c Sun May 16 17:40:32 2004 +0000 @@ -142,6 +142,8 @@ /* Create the cursor */ cursor->x_cursor = XCreatePixmapCursor(SDL_Display, data_pixmap, mask_pixmap, &black, &white, hot_x, hot_y); + XFreePixmap(SDL_Display, data_pixmap); + XFreePixmap(SDL_Display, mask_pixmap); /* Release the event thread */ XSync(SDL_Display, False);