diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-09-11 12:48:40 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-09-11 12:48:40 +0200 |
commit | 644a9d808ef216f37f2be4f5ba86d6c4020e88ee (patch) | |
tree | 2569aca2ec7d85ec17808ee015864ee578a39336 /dom/base/nsContentUtils.cpp | |
parent | 988f834a3fadf1007d1710fac42cbfa6c6ed2ce0 (diff) | |
download | uxp-644a9d808ef216f37f2be4f5ba86d6c4020e88ee.tar.gz |
Release mapped surface memory on size check failure to plug a leak.
Diffstat (limited to 'dom/base/nsContentUtils.cpp')
-rw-r--r-- | dom/base/nsContentUtils.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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(); } |