mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 719429. Fix canvas data leak in DrawTargetCG. r=ajuma
I forgot to fix this before landing and refound it using http://s3.zazub.com/games/circle_game/index.html
This commit is contained in:
parent
66eef4fa37
commit
6fd6cdc9c1
@ -116,6 +116,7 @@ DrawTargetCG::~DrawTargetCG()
|
||||
CGColorSpaceRelease(mColorSpace);
|
||||
if (mCg)
|
||||
CGContextRelease(mCg);
|
||||
free(mData);
|
||||
}
|
||||
|
||||
TemporaryRef<SourceSurface>
|
||||
@ -845,7 +846,6 @@ DrawTargetCG::Init(const IntSize &aSize, SurfaceFormat &)
|
||||
// XXX: currently we allocate ourselves so that we can easily return a gfxImageSurface
|
||||
// we might not need to later if once we don't need to support gfxImageSurface
|
||||
//XXX: currently Init implicitly clears, that can often be a waste of time
|
||||
// XXX: leaked
|
||||
mData = calloc(mSize.height * stride, 1);
|
||||
// XXX: what should we do if this fails?
|
||||
mCg = CGBitmapContextCreate (mData,
|
||||
|
Loading…
Reference in New Issue
Block a user