Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/4195

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/95/4195/1

Fix memory leak in OGLTransitionerImpl::createWindow.

XFree the result of glXGetVisualFromFBConfig and glXGetFBConfigs when done.

Change-Id: I145c7f5f083718d983ccea4b534d4e90056eb14e
---
M slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
1 file changed, 8 insertions(+), 1 deletion(-)



diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx 
b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
index 3c12fee..aa91779 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
@@ -537,7 +537,13 @@
             for ( ; i < nfbconfigs; i++)
             {
                 visinfo = glXGetVisualFromFBConfig (GLWin.dpy, fbconfigs[i]);
-                if( !visinfo || visinfo->visualid != vi->visualid )
+                if( !visinfo )
+                    continue;
+
+                unx::VisualID visualid = visinfo->visualid;
+                XFree ( visinfo );
+
+                if ( visualid != vi->visualid )
                     continue;
 
                 glXGetFBConfigAttrib (GLWin.dpy, fbconfigs[i], GLX_DRAWABLE_TYPE, &value);
@@ -577,6 +583,7 @@
                 pChildSysData = lcl_createSystemWindow( vi, pPWindow, &pWindow );
                 SAL_INFO("slideshow.opengl", "did not find visual suitable for 
texture_from_pixmap, using " << vi->visualid);
             }
+            XFree ( fbconfigs );
 #else
             pChildSysData = lcl_createSystemWindow( vi, pPWindow, &pWindow );
 #endif

-- 
To view, visit https://gerrit.libreoffice.org/4195
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I145c7f5f083718d983ccea4b534d4e90056eb14e
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Mark Wielaard <mark@klomp.org>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.