diff --git a/mail/e-http-request.c b/mail/e-http-request.c
index c12fd76..49cdf60 100644
--- a/mail/e-http-request.c
+++ b/mail/e-http-request.c
@@ -276,6 +276,7 @@ handle_http_request (GSimpleAsyncResult *res,
 			goto cleanup;
 		} else {
 			d (printf ("Failed to load '%s' from cache.\n", uri));
+			g_object_unref (stream);
 		}
 	}
 
@@ -375,7 +376,10 @@ handle_http_request (GSimpleAsyncResult *res,
 		send_and_handle_redirection (session, message, NULL);
 
 		if (!SOUP_STATUS_IS_SUCCESSFUL (message->status_code)) {
-			g_warning ("Failed to request %s (code %d)", uri, message->status_code);
+			g_debug ("Failed to request %s (code %d)", uri, message->status_code);
+			g_object_unref (message);
+			g_object_unref (session);
+			g_main_context_unref (context);
 			goto cleanup;
 		}
 
@@ -409,6 +413,9 @@ handle_http_request (GSimpleAsyncResult *res,
 						"Failed to write data to cache stream: %s",
 						error->message);
 				g_clear_error (&error);
+				g_object_unref (message);
+				g_object_unref (session);
+				g_main_context_unref (context);
 				goto cleanup;
 			}
 		}
