Thank you, here is the patch. 

Regards, 

-- 
Palmer Zent
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Thursday, February 23, 2012 at 8:43 PM, Dominik Seichter wrote:

> You are on your own, to handle the exception, clean up and throw it
> again. We do not have special macros to assist you.
> 
> Cheers,
> Dom
> 
> On Thu, Feb 23, 2012 at 8:22 PM, Palmer Zent <[email protected] 
> (mailto:[email protected])> wrote:
> > Hello,
> > 
> > I noticed a memory leak in podofo when the exception stating that an
> > encryption password is incorrect is thrown.
> > 
> > Output from valgrind :
> > 
> > ==27745== 9,635 (664 direct, 8,971 indirect) bytes in 1 blocks are
> > definitely lost in loss record 415 of 417
> > ==27745==    at 0xB823: malloc (vg_replace_malloc.c:266)
> > ==27745==    by 0x79468D: operator new(unsigned long) (in
> > /usr/lib/libstdc++.6.0.9.dylib)
> > ==27745==    by 0x1012D9: PoDoFo::PdfMemDocument::Load(char const*)
> > (PdfMemDocument.cpp:164)
> > ==27745==    by 0x10126C: PoDoFo::PdfMemDocument::PdfMemDocument(char
> > const*) (PdfMemDocument.cpp:67)
> > ==27745==    by 0x10120C: PoDoFo::PdfMemDocument::PdfMemDocument(char
> > const*) (PdfMemDocument.cpp:66)
> > 
> > It seems like the PdfParser object that is created in PdfMemDocuement::Load
> > is not deleted when ParseFile fails.
> > 
> > I am not sure to understand how exceptions are treated in podofo, could
> > someone help me find a way to correct this ? I'm guessing a simple try/catch
> > would do the job but is there some kind of macro that should be used instead
> > ?
> > 
> > Thanks in advance.
> > 
> > Best regards,
> > 
> > --
> > Palmer Zent
> > Sent with Sparrow
> > 
> > 
> > ------------------------------------------------------------------------------
> > Virtualization & Cloud Management Using Capacity Planning
> > Cloud computing makes use of virtualization - but cloud computing
> > also focuses on allowing computing to be delivered as a service.
> > http://www.accelacomm.com/jaw/sfnl/114/51521223/
> > _______________________________________________
> > Podofo-users mailing list
> > [email protected] 
> > (mailto:[email protected])
> > https://lists.sourceforge.net/lists/listinfo/podofo-users
> > 
> 
> 
> 


Attachment: PdfMemDocument.cpp.diff
Description: Binary data

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to