Index: includes/content.token.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/cck/includes/Attic/content.token.inc,v retrieving revision 1.5.2.8 retrieving revision 1.5.2.10 diff -u -p -r1.5.2.8 -r1.5.2.10 --- includes/content.token.inc 5 Dec 2008 14:59:22 -0000 1.5.2.8 +++ includes/content.token.inc 4 Dec 2010 13:25:13 -0000 1.5.2.10 @@ -1,5 +1,5 @@ type)) { + if (isset($object->type)) { + // Let PHP free the $node object when we are done. Working directly on the + // incoming $object causes memory leak issues on long-running scripts such + // as migrations. See http://drupal.org/node/736440. + $node = drupal_clone($object); $type = content_types($node->type); $node->build_mode = 'token'; $node->content = array();