From 09319b435f0e87cb9def1a695ec59e336de8ff51 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 11 Sep 2018 12:48:40 +0200 Subject: Release mapped surface memory on size check failure to plug a leak. --- dom/base/nsContentUtils.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dom/base/nsContentUtils.cpp') diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 2f85c1b7e..49fe5143f 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -7990,6 +7990,8 @@ GetSurfaceDataImpl(mozilla::gfx::DataSourceSurface* aSurface, &maxBufLen, &bufLen); if (NS_FAILED(rv)) { + // Release mapped memory + aSurface->Unmap(); return GetSurfaceDataContext::NullValue(); } -- cgit v1.2.3