1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 05:51:02 +02:00

Tracing JIT: Fixed possible memory-leak or missed destructor call.

Reference-counter of return_value may be indirectly decremented to 1.
This commit is contained in:
Dmitry Stogov
2021-09-28 22:40:04 +03:00
parent 97b5eeeb6c
commit c30298bf57

View File

@@ -1786,6 +1786,11 @@ propagate_arg:
return_value_info.type &= ~MAY_BE_UNDEF;
return_value_info.type |= MAY_BE_NULL;
}
if (return_value_info.type & (MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_RESOURCE)) {
/* CVs are going to be destructed and the reference-counter
of return value may be decremented to 1 */
return_value_info.type |= MAY_BE_RC1;
}
return_value_info.type &= ~MAY_BE_GUARD;
}
break;