diff options
author | fvogel <fvogelnew1@free.fr> | 2023-07-19 20:35:32 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2023-07-19 20:35:32 (GMT) |
commit | 111379aa313dcebc58385b6e7da71a3f49274f10 (patch) | |
tree | 1b953bc8c52b6e0d57685d4aa8ac2b6c21f2eedf /macosx/tkMacOSXImage.c | |
parent | d5eda6f28707035093efe129d5788d0c1946cdd7 (diff) | |
download | tk-111379aa313dcebc58385b6e7da71a3f49274f10.zip tk-111379aa313dcebc58385b6e7da71a3f49274f10.tar.gz tk-111379aa313dcebc58385b6e7da71a3f49274f10.tar.bz2 |
Fix [edb769628e]: Aqua: leak in XGetImage(). Patch from Christopher Chavez.
Diffstat (limited to 'macosx/tkMacOSXImage.c')
-rw-r--r-- | macosx/tkMacOSXImage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index 1d4238d..32f3db9 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -776,7 +776,6 @@ XGetImage( bitmap_fmt = [bitmapRep bitmapFormat]; size = [bitmapRep bytesPerPlane]; bytes_per_row = [bitmapRep bytesPerRow]; - bitmap = (char *)ckalloc(size); if ((bitmap_fmt != 0 && bitmap_fmt != NSAlphaFirstBitmapFormat) || [bitmapRep samplesPerPixel] != 4 || [bitmapRep isPlanar] != 0 @@ -786,6 +785,7 @@ XGetImage( [bitmapRep release]; return NULL; } + bitmap = (char *)ckalloc(size); memcpy(bitmap, (char *)[bitmapRep bitmapData], size); [bitmapRep release]; |