Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libdocument/ev-file-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdocument/ev-file-helpers.c')
-rw-r--r--libdocument/ev-file-helpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c
index 8d51301..8811f25 100644
--- a/libdocument/ev-file-helpers.c
+++ b/libdocument/ev-file-helpers.c
@@ -252,11 +252,14 @@ get_mime_type_from_data (const gchar *uri, GError **error)
size_read = g_input_stream_read (G_INPUT_STREAM (input_stream),
buffer, sizeof (buffer), NULL, error);
if (size_read == -1) {
+ g_object_unref (input_stream);
g_object_unref (file);
return NULL;
}
retval = g_input_stream_close (G_INPUT_STREAM (input_stream), NULL, error);
+
+ g_object_unref (input_stream);
g_object_unref (file);
if (!retval)
return NULL;