Commit 2156b933 authored by Sam Lantinga's avatar Sam Lantinga

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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40889
parent 7fe0dc0b
...@@ -142,6 +142,8 @@ WMcursor *X11_CreateWMCursor(_THIS, ...@@ -142,6 +142,8 @@ WMcursor *X11_CreateWMCursor(_THIS,
/* Create the cursor */ /* Create the cursor */
cursor->x_cursor = XCreatePixmapCursor(SDL_Display, data_pixmap, cursor->x_cursor = XCreatePixmapCursor(SDL_Display, data_pixmap,
mask_pixmap, &black, &white, hot_x, hot_y); mask_pixmap, &black, &white, hot_x, hot_y);
XFreePixmap(SDL_Display, data_pixmap);
XFreePixmap(SDL_Display, mask_pixmap);
/* Release the event thread */ /* Release the event thread */
XSync(SDL_Display, False); XSync(SDL_Display, False);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment