summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/color/color.module6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/color/color.module b/modules/color/color.module
index dfdbce101..2558495c8 100644
--- a/modules/color/color.module
+++ b/modules/color/color.module
@@ -359,6 +359,9 @@ function _color_render_images($theme, &$info, &$paths, $palette) {
// Blend over template
imagecopy($target, $source, 0, 0, 0, 0, $width, $height);
+ // Clean up template image
+ imagedestroy($source);
+
// Cut out slices
foreach ($info['slices'] as $file => $coord) {
list($x, $y, $width, $height) = $coord;
@@ -385,8 +388,7 @@ function _color_render_images($theme, &$info, &$paths, $palette) {
$paths['map'][$file] = $base;
}
- // Clean up
- imagedestroy($source);
+ // Clean up target buffer
imagedestroy($target);
}