]> www.fi.muni.cz Git - evince.git/commitdiff
Fix memory leak.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Thu, 24 Apr 2008 08:49:39 +0000 (08:49 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Thu, 24 Apr 2008 08:49:39 +0000 (08:49 +0000)
2008-04-24  Carlos Garcia Campos  <carlosgc@gnome.org>

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

Fix memory leak.

svn path=/trunk/; revision=3022

ChangeLog
libdocument/ev-document-factory.c

index 20b0030ec4f212c80ec2fce8eaee8a1bfd1f5513..9db436e94ce5cc96625ede621fedfa3c5aaafd58 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,15 @@
+2008-04-24  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * libdocument/ev-document-factory.c: (get_document_from_uri):
+
+       Fix memory leak.
+       
 2008-04-24   Jean Baptiste Lallement  <jeanbaptiste.lallement@gmail.com>
 
        * libdocument/ev-document-factory.c (get_mime_type_from_uri),
        (get_mime_type_from_data), (get_document_from_uri),
        (ev_document_factory_get_document):
+       
        Improved error message about file opening failture.
        Bug #529129.
 
index 328ff74326083b7d2e6e6448b2b9fb1a846edb8e..64eaabaa25d52ac37487db5cf3367ab05c6dbca9 100644 (file)
@@ -184,12 +184,15 @@ get_document_from_uri (const char        *uri,
 #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;