Fixes memory leak introduced in 2b9af967

Fixes https://bugs.php.net/bug.php?id=68285
Merge branch 'pull-request/914' into PHP-5.5

* pull-request/914:
  Fixes memory leak introduced in 2b9af967