diff --git a/CefSharp/ResourceHandler.cs b/CefSharp/ResourceHandler.cs index d5fa8dbe3b..f17890d316 100644 --- a/CefSharp/ResourceHandler.cs +++ b/CefSharp/ResourceHandler.cs @@ -335,7 +335,7 @@ public static IResourceHandler ForErrorMessage(string errorMessage, HttpStatusCo { var stream = GetMemoryStream(errorMessage, Encoding.UTF8); - var resourceHandler = FromStream(stream); + var resourceHandler = FromStream(stream, autoDisposeStream: true); resourceHandler.StatusCode = (int)statusCode; return resourceHandler;