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
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Fixes memory leak introduced in 2b9af967