summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-06-08 06:06:44 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-06-08 06:06:44 (GMT)
commita317fda01fd9df46754fab6ca3c9207931dc0979 (patch)
tree410dd38177b7354e23b06d3f85c5fa6936ae53c5 /macosx
parent274946bac908c5520729223647320fb2c25e8a1d (diff)
downloadtk-a317fda01fd9df46754fab6ca3c9207931dc0979.zip
tk-a317fda01fd9df46754fab6ca3c9207931dc0979.tar.gz
tk-a317fda01fd9df46754fab6ca3c9207931dc0979.tar.bz2
Fix [57844100da]: Aqua: fix leak in TkScrollWindow(). Patch from Christopher Chavez.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXDraw.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 5698a44..002d7f2 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -1175,6 +1175,8 @@ TkScrollWindow(
srcRgn = HIShapeCreateWithRect(&srcRect);
dstRgn = HIShapeCreateWithRect(&dstRect);
ChkErr(HIShapeDifference, srcRgn, dstRgn, dmgRgn);
+ CFRelease(dstRgn);
+ CFRelease(srcRgn);
result = HIShapeIsEmpty(dmgRgn) ? 0 : 1;
}
@@ -1185,10 +1187,6 @@ TkScrollWindow(
TkMacOSXSetWithNativeRegion(damageRgn, dmgRgn);
- /*
- * Mutable shapes are not reference counted, and must be released.
- */
-
CFRelease(dmgRgn);
return result;
}