diff options
author | Uli Schlachter <psychon@znc.in> | 2013-12-29 21:39:17 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-05 21:04:43 +0100 |
commit | ffac6ee2673a573a9db4f75a89c4c53251fa1304 (patch) | |
tree | 9b0dad4bf5a952533017496d9afdb314bd59af03 /src/plugins/platforms/xcb/qxcbcursor.cpp | |
parent | 8b17f13c094d357b3a2d9a5e64bd1334791660fc (diff) |
XCB: Fix pixmap leak
In qt_xcb_XPixmapFromBitmap(), a new pixmap is generated for the caller.
This pixmap has to be freed after use. However,
createNonStandardCursor() didn't do this and instead leaked the pixmap.
Change-Id: I6fee180ec6508db9e82a5bb028957e7d9f7a4632
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbcursor.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbcursor.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbcursor.cpp b/src/plugins/platforms/xcb/qxcbcursor.cpp index 11848d503b..15e5bf27f1 100644 --- a/src/plugins/platforms/xcb/qxcbcursor.cpp +++ b/src/plugins/platforms/xcb/qxcbcursor.cpp @@ -483,6 +483,8 @@ xcb_cursor_t QXcbCursor::createNonStandardCursor(int cshape) xcb_pixmap_t pmm = qt_xcb_XPixmapFromBitmap(m_screen, image.createAlphaMask()); cursor = xcb_generate_id(conn); xcb_create_cursor(conn, cursor, pm, pmm, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF, 8, 8); + xcb_free_pixmap(conn, pm); + xcb_free_pixmap(conn, pmm); } } |