summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libsoup/soup-cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libsoup/soup-cache.c b/libsoup/soup-cache.c
index 4812f469..5b64575c 100644
--- a/libsoup/soup-cache.c
+++ b/libsoup/soup-cache.c
@@ -1035,7 +1035,8 @@ soup_cache_send_response (SoupCache *cache, SoupMessage *msg)
were the file was no longer there (for example files
removed without notifying the cache */
file = g_file_new_for_path (entry->filename);
- stream = (GInputStream *)g_file_read (file, NULL, NULL);
+ stream = G_INPUT_STREAM (g_file_read (file, NULL, NULL));
+ g_object_unref (file);
return stream;
}