Fixes memory leak introduced in 2b9af967

Fixes https://bugs.php.net/bug.php?id=68285