[poppler] glib/poppler-document.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Wed May 2 10:38:33 PDT 2012


 glib/poppler-document.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e55838b41959acc311e9b00dc390c9816a9afac2
Author: Jason <jasongross9+bugzilla at gmail.com>
Date:   Wed May 2 19:35:26 2012 +0200

    glib: Use delete[] to free array allocated with new[]
    
    https://bugs.freedesktop.org/show_bug.cgi?id=48447

diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc
index c6108d4..a78b5ec 100644
--- a/glib/poppler-document.cc
+++ b/glib/poppler-document.cc
@@ -192,7 +192,7 @@ poppler_document_new_from_file (const char  *uri,
   length = MultiByteToWideChar(CP_UTF8, 0, filename, -1, filenameW, length);
 
   newDoc = new PDFDoc(filenameW, length, password_g, password_g);
-  delete filenameW;
+  delete [] filenameW;
 #else
   filename_g = new GooString (filename);
   newDoc = new PDFDoc(filename_g, password_g, password_g);


More information about the poppler mailing list