Skip to content

Commit

Permalink
fix memleak
Browse files Browse the repository at this point in the history
  • Loading branch information
zeriyoshi committed Sep 9, 2024
1 parent 2b25be6 commit 5fae76a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/hook.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ static inline void apply_interval(timelib_time **time, timelib_rel_time *interva
memcpy(&orig, Z_PHPDATE_P(return_value)->time, sizeof(timelib_time)); \
/* Note: createFromFormat does not handle microseconds, so a wait in seconds is necessary */ \
usleep(((uint32_t) COLOPL_TS_G(usleep_sec)) > 0 ? ((uint32_t) COLOPL_TS_G(usleep_sec) * 1000000) : 1000000); \
zval_ptr_dtor(return_value); \
CALL_ORIGINAL_FUNCTION(name); \
\
if (Z_PHPDATE_P(return_value)->time->y == orig.y && \
Expand Down

0 comments on commit 5fae76a

Please sign in to comment.