Skip to content

Commit

Permalink
Fix memleak on PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
cs278 committed Nov 6, 2023
1 parent 9ac5a18 commit 0a9769d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion timecop_php7.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ zend_always_inline static int parse_travel_freeze_arguments(tc_timeval *ret, INT
#if PHP_VERSION_ID >= 80000
ZEND_PARSE_PARAMETERS_START(1, 1);
Z_PARAM_OBJ_OF_CLASS_OR_LONG(dt_obj, TIMECOP_G(ce_DateTimeInterface), timestamp);
ZEND_PARSE_PARAMETERS_END_EX(return 0;);
ZEND_PARSE_PARAMETERS_END_EX(return 1;);

if (dt_obj) {
get_timeval_from_datetime(ret, dt_obj, dt_obj->ce);
Expand Down

0 comments on commit 0a9769d

Please sign in to comment.