xcb: Fix a colormap leak
authorUli Schlachter <psychon@znc.in>
Thu, 1 Nov 2012 18:22:18 +0000 (19:22 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 2 Nov 2012 17:07:35 +0000 (18:07 +0100)
The function createDummyWindow() allocated a colormap, but never freed
it. Freeing it is safe after the window is created.

Change-Id: I4c876568572c9e1e9dde7047850a51917ef3702f
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
src/plugins/platforms/xcb/qglxintegration.cpp

index 8c300d6..10aaa5a 100644 (file)
@@ -86,6 +86,7 @@ static Window createDummyWindow(QXcbScreen *screen, XVisualInfo *visualInfo)
                                   0, 0, 100, 100,
                                   0, visualInfo->depth, InputOutput, visualInfo->visual,
                                   CWBackPixel|CWBorderPixel|CWColormap, &a);
+    XFreeColormap(DISPLAY_FROM_XCB(screen), cmap);
     return window;
 }