evince r3022 - in trunk: . libdocument



Author: carlosgc
Date: Thu Apr 24 08:49:39 2008
New Revision: 3022
URL: http://svn.gnome.org/viewvc/evince?rev=3022&view=rev

Log:
2008-04-24  Carlos Garcia Campos  <carlosgc gnome org>

	* libdocument/ev-document-factory.c: (get_document_from_uri):

	Fix memory leak.


Modified:
   trunk/ChangeLog
   trunk/libdocument/ev-document-factory.c

Modified: trunk/libdocument/ev-document-factory.c
==============================================================================
--- trunk/libdocument/ev-document-factory.c	(original)
+++ trunk/libdocument/ev-document-factory.c	Thu Apr 24 08:49:39 2008
@@ -184,12 +184,15 @@
 #endif /* ENABLE_PIXBUF */
 
 	if (document == NULL) {
+		gchar *mime_desc;
+
+		mime_desc = g_content_type_get_description (mime_type);
 		g_set_error (error,
 			     EV_DOCUMENT_ERROR,	
 			     0,
 			     _("File type %s (%s) is not supported"),
-			     g_content_type_get_description (mime_type),
-			     mime_type);
+			     mime_desc, mime_type);
+		g_free (mime_desc);
 		g_free (mime_type);
 
 		return NULL;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]