From f3a19b8e9b5a70bd5832246588fddd580571528e Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Tue, 11 Sep 2018 12:48:40 +0200 Subject: [PATCH] Release mapped surface memory on size check failure to plug a leak. --- dom/base/nsContentUtils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 2f85c1b7e1..49fe5143f6 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(); }