1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Files
archived-php-src/Zend/tests/nullsafe_operator/040.phpt
Dmitry Stogov a60a9b4a89 Fix memory leak
Fixes oss-fuzz #44222
2022-02-01 16:24:22 +03:00

20 lines
284 B
PHP

--TEST--
Memory leak in JMP_NULL
--FILE--
<?php
function &returns_ref($unused) {
global $foo;
return $foo;
}
function &returns_ref2() {
return returns_ref(returns_ref(null)?->null);
}
$foo2 = &returns_ref2();
$foo2 = 'foo';
var_dump($foo);
?>
--EXPECT--
string(3) "foo"