|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13230 PDF functions leak
Submitted: 2001-09-10 09:05 UTC Modified: 2001-09-10 13:09 UTC
From: Assigned:
Status: Closed Package: PDF related
PHP Version: 4.0CVS-2001-09-10 OS: Linux 2.4.5/RedHat
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2001-09-10 09:05 UTC]
This piece of code:

    $p = pdf_new ();
    pdf_open_file ($p);
    pdf_close ($p);

Gives these leaks:
pdf.c(306) :  Freeing 0x0820B324 (65536 bytes), script=3pdf.php
Last leak repeated 2 times

This code:
    $p = pdf_new ();

Gives this leak:
pdf.c(306) :  Freeing 0x08200D54 (2116 bytes), script=3pdf.php
Last leak repeated 1 time



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-10 11:30 UTC]
You should call PDF_delete($); at the end of a script containing PDF functions. This will cleanup the resources allocated by PDFlib.

This might be done in the function given to zend_register_list_destructors_ex (_free_pdf_doc), but as I don't know documentation when this is called it is not yet integrated into the source pdf.c.

For the moment I donot know how to decide whether PDF_delete already was called when _free_pdf_doc() is called.

 [2001-09-10 13:09 UTC]
Fixed it myself.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 07:01:27 2024 UTC