<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 - Fix memory leaks when running pdfseparate"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=84768">84768</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Fix memory leaks when running pdfseparate
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>poppler
          </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>poppler-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>aacid@kde.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=107528" name="attach_107528" title="The said patch">attachment 107528</a> <a href="attachment.cgi?id=107528&action=edit" title="The said patch">[details]</a></span>
The said patch

valgrind --leak-check=full ./utils/pdfseparate ~/okularfiles/pdf/ansi_c.pdf -f
1 -l 1 moo%d

without the patch i get 

==19598== LEAK SUMMARY:
==19598==    definitely lost: 368 bytes in 13 blocks
==19598==    indirectly lost: 668,796 bytes in 145 blocks
==19598==      possibly lost: 0 bytes in 0 blocks


with the patch i get

==21725== LEAK SUMMARY:
==21725==    definitely lost: 0 bytes in 0 blocks
==21725==    indirectly lost: 0 bytes in 0 blocks
==21725==      possibly lost: 0 bytes in 0 blocks

So i think it looks good, but would like Thomas' review.

It also removes some unused code.</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>