summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-06-11 08:36:07 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-06-11 08:36:07 (GMT)
commit3b6cf7f1029f8406d032173c7e8a3cc65afb6f1e (patch)
tree300a79c3d89ac612639543d5d0cecf02cd56177e /macosx
parent321e94853dc9a87fb9eab06376938a85fa2c767a (diff)
parenta317fda01fd9df46754fab6ca3c9207931dc0979 (diff)
downloadtk-3b6cf7f1029f8406d032173c7e8a3cc65afb6f1e.zip
tk-3b6cf7f1029f8406d032173c7e8a3cc65afb6f1e.tar.gz
tk-3b6cf7f1029f8406d032173c7e8a3cc65afb6f1e.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 ec3c963..f8c6ff9 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;
}