summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-11 12:48:40 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-11 12:48:40 +0200
commit09319b435f0e87cb9def1a695ec59e336de8ff51 (patch)
tree2569aca2ec7d85ec17808ee015864ee578a39336
parentcbfef7fcdb853916ff04015f6ee2d4b86f424a08 (diff)
downloadUXP-09319b435f0e87cb9def1a695ec59e336de8ff51.tar
UXP-09319b435f0e87cb9def1a695ec59e336de8ff51.tar.gz
UXP-09319b435f0e87cb9def1a695ec59e336de8ff51.tar.lz
UXP-09319b435f0e87cb9def1a695ec59e336de8ff51.tar.xz
UXP-09319b435f0e87cb9def1a695ec59e336de8ff51.zip
Release mapped surface memory on size check failure to plug a leak.
-rw-r--r--dom/base/nsContentUtils.cpp2
1 files changed, 2 insertions, 0 deletions
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();
}