<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - memory leak of visual info"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=64324">64324</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>memory leak of visual info
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>minor
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>askinner@mathworks.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Drivers/X11
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is a small leak (64 bytes) that happens as we allocate and free Visuals
and FBConfigs in X11.  Brian Paul mentioned that he wouldn't be sure it was a
leak without study, so I figured I'd propose it here, just to track it.

XMesaCreateVisual allocates an XMesaVisual, then allocates an XVisualInfo and
copies into it the XVisualInfo that was passed into the function, and stores
the pointer in the XMesaVisua, as visinfo.

XMesaDestroyVisual calls free on both the XVisualInfo and the XMesaVisual. 
This is never called.

But destroy_visuals_on_display(), in fakeglx.c, only calls free on the
XMesaVisual.  Nothing frees the XVisualInfo that was copied into the pointer
stored in XMesaVisual.

I don't know whether destroy_visuals_on_display() should call
XMesaDestroyVisual(VisualTable[i]), or should just
free(VisualTable[i]->visinfo).

Thanks
andy</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>