[Poppler-bugs] [Bug 6187] New: mem leak in poppler_page_get_text

bugzilla-daemon at annarchy.freedesktop.org bugzilla-daemon at annarchy.freedesktop.org
Wed Mar 8 12:46:50 PST 2006


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=6187          
     
           Summary: mem leak in poppler_page_get_text
           Product: poppler
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: glib frontend
        AssignedTo: poppler-bugs at lists.freedesktop.org
        ReportedBy: chpe at gnome.org


==16259== 32 (16 direct, 16 indirect) bytes in 2 blocks are definitely lost in
loss record 93 of 305
==16259==    at 0x401B7F3: operator new(unsigned) (vg_replace_malloc.c:164)
==16259==    by 0x42C6B1F: poppler_page_get_text (poppler-page.cc:633)
==16259==    by 0x8097742: pdf_document_get_text(_EvDocument*, int,
EvRectangle*) (ev-poppler.cc:538)
==16259==    by 0x808BE63: ev_document_get_text (ev-document.c:183)
==16259==    by 0x806F81C: get_selected_text (ev-view.c:3812)
==16259==    by 0x806F97D: ev_view_primary_get_cb (ev-view.c:3854)

Code:

poppler_page_get_text (PopplerPage      *page,
                       PopplerRectangle *selection)
{
[...]
  GooString *sel_text = new GooString;
[...]
  sel_text = text_dev->getSelectionText (&pdf_selection);
  result = g_strdup (sel_text->getCString ());
  delete sel_text;

  return result;
}

text_dev->getSelectionText returns a new'd GooString too, so this leaks.          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Poppler-bugs mailing list