From f694707cfe64a5d988b219e39b657acd88776447 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Sat, 29 Oct 2016 17:00:57 +0200 Subject: [PATCH] Fix non-repeating timers leaking after successful completion --- php_uv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/php_uv.c b/php_uv.c index b90a57f..9a5a0ef 100644 --- a/php_uv.c +++ b/php_uv.c @@ -2142,6 +2142,10 @@ static void php_uv_timer_cb(uv_timer_t *handle) zval_ptr_dtor(&retval); zval_ptr_dtor(¶ms[0]); + + if (!handle->repeat) { + zend_list_delete(uv->resource_id); + } } static void php_uv_signal_cb(uv_signal_t *handle, int sig_num)