Skip to content

Commit

Permalink
Fix PHP8 Memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
longxinH committed Aug 21, 2020
1 parent 020c7f8 commit 79597c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This version supports PHP7
- 7.2
- 7.3
- 7.4
- nightly
- 8.0beta2

# Installation
```
Expand Down
4 changes: 3 additions & 1 deletion extension/xhprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,8 @@ zend_string *hp_trace_callback_curl_exec(zend_string *symbol, zend_execute_data
#else
if (arg == NULL || Z_TYPE_P(arg) != IS_OBJECT) {
#endif
return symbol;
result = strpprintf(0, "%s", ZSTR_VAL(symbol));
return result;
}

zval params[1];
Expand Down Expand Up @@ -1555,6 +1556,7 @@ zend_string *hp_trace_callback_curl_exec(zend_string *symbol, zend_execute_data

zval_ptr_dtor(&func);
zval_ptr_dtor(&retval);
zval_ptr_dtor(&params);

return result;
}
Expand Down

0 comments on commit 79597c0

Please sign in to comment.