<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>106657</bug_id>
          
          <creation_ts>2013-01-11 05:19:23 -0800</creation_ts>
          <short_desc>[AC] Memory leak in GLXConfigSelector::createConfig()</short_desc>
          <delta_ts>2013-01-17 10:31:16 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebGL</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sudarsana Nagineni (babu)">naginenis</reporter>
          <assigned_to name="Sudarsana Nagineni (babu)">naginenis</assigned_to>
          <cc>kenneth</cc>
    
    <cc>noam</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>zeno</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>805194</commentid>
    <comment_count>0</comment_count>
    <who name="Sudarsana Nagineni (babu)">naginenis</who>
    <bug_when>2013-01-11 05:19:23 -0800</bug_when>
    <thetext>Noticed the following leak in WebCore::GLXConfigSelector::createConfig().

==15598== 640 bytes in 1 blocks are definitely lost in loss record 5,498 of 5,864
==15598==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15598==    by 0xCA3E915: XGetVisualInfo (VisUtil.c:78)
==15598==    by 0xC7BF2CE: glXGetVisualFromFBConfig (in /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2)
==15598==    by 0x9DA3A0B: WebCore::GLXConfigSelector::createConfig(int const*) (GLXConfigSelector.h:128)
==15598==    by 0x9DA3966: WebCore::GLXConfigSelector::surfaceContextConfig() (GLXConfigSelector.h:98)
==15598==    by 0x9DA3297: WebCore::GLXTransportSurface::configuration() (GLXSurface.cpp:71)
==15598==    by 0x9DA3132: WebCore::GLXTransportSurface::GLXTransportSurface() (GLXSurface.cpp:49)
==15598==    by 0x9DE0255: WebCore::GLPlatformSurface::createTransportSurface() (GLPlatformSurface.cpp:59)
==15598==    by 0x9DDB5A0: WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate(WebCore::GraphicsContext3D*, WebCore::HostWindow*, WebCore::GraphicsContext3D::RenderStyle) (GraphicsContext3DPrivate.
==15598==    by 0x9DD9520: WebCore::GraphicsContext3D::GraphicsContext3D(WebCore::GraphicsContext3D::Attributes, WebCore::HostWindow*, WebCore::GraphicsContext3D::RenderStyle) (GraphicsContext3DEfl.cpp:66)
==15598==    by 0x9DD92CA: WebCore::GraphicsContext3D::create(WebCore::GraphicsContext3D::Attributes, WebCore::HostWindow*, WebCore::GraphicsContext3D::RenderStyle) (GraphicsContext3DEfl.cpp:40)
==15598==    by 0x8F0061C: WebCore::WebGLRenderingContext::create(WebCore::HTMLCanvasElement*, WebCore::WebGLContextAttributes*) (WebGLRenderingContext.cpp:430)
==15598==    by 0x8E32B71: WebCore::HTMLCanvasElement::getContext(WTF::String const&amp;, WebCore::CanvasContextAttributes*) (HTMLCanvasElement.cpp:202)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>805200</commentid>
    <comment_count>1</comment_count>
      <attachid>182326</attachid>
    <who name="Sudarsana Nagineni (babu)">naginenis</who>
    <bug_when>2013-01-11 05:30:57 -0800</bug_when>
    <thetext>Created attachment 182326
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>809347</commentid>
    <comment_count>2</comment_count>
      <attachid>182326</attachid>
    <who name="Laszlo Gombos">laszlo.gombos</who>
    <bug_when>2013-01-17 08:21:45 -0800</bug_when>
    <thetext>Comment on attachment 182326
Patch

The change looks good to me. This code would read better if we would have a temporary visualInfo variable instead of manipulating the member variable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>809403</commentid>
    <comment_count>3</comment_count>
    <who name="Sudarsana Nagineni (babu)">naginenis</who>
    <bug_when>2013-01-17 09:49:07 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 182326 [details])
&gt; The change looks good to me. This code would read better if we would have a temporary visualInfo variable instead of manipulating the member variable.

Okay. I will handle this in a separate patch as we discussed on IRC.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>809449</commentid>
    <comment_count>4</comment_count>
      <attachid>182326</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-01-17 10:31:13 -0800</bug_when>
    <thetext>Comment on attachment 182326
Patch

Clearing flags on attachment: 182326

Committed r139988: &lt;http://trac.webkit.org/changeset/139988&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>809450</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-01-17 10:31:16 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>182326</attachid>
            <date>2013-01-11 05:30:57 -0800</date>
            <delta_ts>2013-01-17 10:31:13 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>106657.patch</filename>
            <type>text/plain</type>
            <size>1450</size>
            <attacher name="Sudarsana Nagineni (babu)">naginenis</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZw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xYQ29uZmlnU2VsZWN0b3IuaCBiL1NvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL2dyYXBo
aWNzL3N1cmZhY2VzL2dseC9HTFhDb25maWdTZWxlY3Rvci5oCmluZGV4IGExYjE0YmUuLjdlMGNm
YzAgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL2dyYXBoaWNzL3N1cmZhY2Vz
L2dseC9HTFhDb25maWdTZWxlY3Rvci5oCisrKyBiL1NvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL2dy
YXBoaWNzL3N1cmZhY2VzL2dseC9HTFhDb25maWdTZWxlY3Rvci5oCkBAIC0xMjEsNiArMTIxLDkg
QEAgcHJpdmF0ZToKICAgICAgICAgYm9vbCBmb3VuZCA9IGZhbHNlOwogCiAgICAgICAgIGZvciAo
aW50IGkgPSAwOyBpIDwgbnVtQXZhaWxhYmxlQ29uZmlnczsgKytpKSB7CisgICAgICAgICAgICBp
ZiAobV92aXN1YWxJbmZvKQorICAgICAgICAgICAgICAgIFhGcmVlKG1fdmlzdWFsSW5mbyk7CisK
ICAgICAgICAgICAgIG1fdmlzdWFsSW5mbyA9IGdsWEdldFZpc3VhbEZyb21GQkNvbmZpZyhtX3No
YXJlZERpc3BsYXksIHRlbXBbaV0pOwogICAgICAgICAgICAgaWYgKCFtX3Zpc3VhbEluZm8pCiAg
ICAgICAgICAgICAgICAgY29udGludWU7Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>