From 0c59b99bc6ad737227a6c684105810b0e04294f5 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Thu, 24 Apr 2008 08:49:39 +0000 Subject: [PATCH] Fix memory leak. 2008-04-24 Carlos Garcia Campos * libdocument/ev-document-factory.c: (get_document_from_uri): Fix memory leak. svn path=/trunk/; revision=3022 --- ChangeLog | 7 +++++++ libdocument/ev-document-factory.c | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20b0030e..9db436e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,15 @@ +2008-04-24 Carlos Garcia Campos + + * libdocument/ev-document-factory.c: (get_document_from_uri): + + Fix memory leak. + 2008-04-24 Jean Baptiste Lallement * 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. diff --git a/libdocument/ev-document-factory.c b/libdocument/ev-document-factory.c index 328ff743..64eaabaa 100644 --- a/libdocument/ev-document-factory.c +++ b/libdocument/ev-document-factory.c @@ -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; -- 2.43.5