Skip to content

Commit 6628aaa

Browse files
committed
fix memory issue
1 parent e4e7535 commit 6628aaa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/filter/filter.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,12 @@ static unsigned int php_sapi_filter(int arg, const char *var, char **val, size_t
335335
}
336336
if (array_ptr)
337337
{
338+
Z_TRY_ADDREF_P(&raw_var);
338339
php_register_variable_ex(var, &raw_var, array_ptr);
339340
}
340341
if (orig_array_ptr)
341342
{
343+
Z_TRY_ADDREF_P(&raw_var);
342344
php_register_variable_ex(var, &raw_var, orig_array_ptr);
343345
}
344346

0 commit comments

Comments
 (0)