[poppler] poppler/glib: poppler-page.cc,1.44,1.45

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Mon Mar 20 20:25:55 PST 2006


Update of /cvs/poppler/poppler/glib
In directory kemper:/tmp/cvs-serv4097/glib

Modified Files:
	poppler-page.cc 
Log Message:
2006-03-20  Jeff Muizelaar  <jeff at infidigm.net>

	* glib/poppler-page.cc: Avoid strdup in poppler_page_get_property and
	make code cleaner. Combined with the memleak fix closes #6187.
	Patch by chpe.


Index: poppler-page.cc
===================================================================
RCS file: /cvs/poppler/poppler/glib/poppler-page.cc,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- poppler-page.cc	21 Mar 2006 04:19:19 -0000	1.44
+++ poppler-page.cc	21 Mar 2006 04:25:53 -0000	1.45
@@ -749,15 +749,12 @@
 {
   PopplerPage *page = POPPLER_PAGE (object);
   GooString label;
-  char *utf8_label;
 
   switch (prop_id)
     {
     case PROP_LABEL:
       page->document->doc->getCatalog ()->indexToLabel (page->index, &label);
-      utf8_label = _poppler_goo_string_to_utf8(&label);
-      g_value_set_string (value, utf8_label);
-      g_free (utf8_label);  
+      g_value_take_string (value, _poppler_goo_string_to_utf8(&label));
       break;
     }
 }



More information about the poppler mailing list