<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - function cairo_text_extents causes resource leaks"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105739">105739</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>function cairo_text_extents causes resource leaks
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>cairo
          </td>
        </tr>

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

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

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

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>chris@chris-wilson.co.uk
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vgdoqd@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>cairo-bugs@cairographics.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>`cairo_text_extents` refs the current font face of cairo_t, and leads to
resource leaks. The callstack is as follows

```
#0  cairo_font_face_reference (font_face=0x419908) at cairo-font-face.c:134
#1  cairo_scaled_font_create (font_face=0x439410, font_matrix=0x419340,
ctm=0xbfffedb0, options=0xbfffede0) at cairo-scaled-font.c:1179
#2  _cairo_gstate_ensure_scaled_font (gstate=0x4192f0) at cairo-gstate.c:1915
#3  _cairo_gstate_get_scaled_font (gstate=0x4192f0, scaled_font=0xbfffee54) at
cairo-gstate.c:1787
#4  _cairo_default_context_get_scaled_font (abstract_cr=0x4192d0) at
cairo-default-context.c:1300
#5  cairo_get_scaled_font (cr=0x4192d0) at cairo.c:3348
#6  cairo_text_extents (cr=0x4192d0, utf8=0x400d8e "Hello, Cairo!",
extents=0xbfffeee8) at cairo.c:3398
```</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>