[evince: 6/13] properties-view: Don't leak the document if it's encrypted
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince: 6/13] properties-view: Don't leak the document if it's encrypted
- Date: Mon, 4 Jun 2012 10:30:11 +0000 (UTC)
commit 32165b17a28e1315075f4eb725972d15ae9ad109
Author: Christian Persch <chpe gnome org>
Date: Sun Feb 14 21:26:22 2010 +0100
properties-view: Don't leak the document if it's encrypted
For encrypted documents, ev_document_load() returns a document *and*
sets the GError; handle this.
properties/ev-properties-main.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/properties/ev-properties-main.c b/properties/ev-properties-main.c
index 1a7cccd..8ac0222 100644
--- a/properties/ev-properties-main.c
+++ b/properties/ev-properties-main.c
@@ -86,7 +86,7 @@ ev_properties_get_pages (NautilusPropertyPageProvider *provider,
GList *files)
{
GError *error = NULL;
- EvDocument *document;
+ EvDocument *document = NULL;
GList *pages = NULL;
NautilusFileInfo *file;
gchar *uri = NULL;
@@ -120,14 +120,16 @@ ev_properties_get_pages (NautilusPropertyPageProvider *provider,
gtk_widget_show (page);
property_page = nautilus_property_page_new ("document-properties",
label, page);
- g_object_unref (document);
pages = g_list_prepend (pages, property_page);
end:
g_free (uri);
g_free (mime_type);
-
+
+ if (document != NULL)
+ g_object_unref (document);
+
return pages;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]