[poppler] glib/poppler-page.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Fri Jul 25 06:46:47 PDT 2014


 glib/poppler-page.cc |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit b729bf92ea1522a1eed9579e53e7580215cb9555
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Fri Jul 25 15:45:55 2014 +0200

    glib: Fix a memory leak when getting text layout and attributes

diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc
index 167640d..6e2e7f8 100644
--- a/glib/poppler-page.cc
+++ b/glib/poppler-page.cc
@@ -2239,6 +2239,8 @@ poppler_page_get_text_layout_for_area (PopplerPage       *page,
 	      rect->y2 = y2;
 	      offset++;
             }
+
+          delete word_sel;
         }
 
       if (i < n_lines - 1 && offset > 0)
@@ -2400,6 +2402,8 @@ poppler_page_get_text_attributes_for_area (PopplerPage      *page,
               attrs->end_index = offset;
               offset++;
             }
+
+          delete word_sel;
         }
 
       if (i < n_lines - 1)


More information about the poppler mailing list