diff --git a/examples/fsevevnt.php b/examples/fsevevnt.php index 4f818b0..1946cf9 100644 --- a/examples/fsevevnt.php +++ b/examples/fsevevnt.php @@ -1,10 +1,8 @@ loop; - if ((php_uv_loop_t *) obj != UV_G(default_loop)) { + php_uv_loop_t *loop_obj = (php_uv_loop_t *) obj; + uv_loop_t *loop = &loop_obj->loop; + if (loop_obj != UV_G(default_loop)) { uv_stop(loop); /* in case we haven't stopped the loop yet otherwise ... */ uv_run(loop, UV_RUN_DEFAULT); /* invalidate the stop ;-) */ @@ -1204,6 +1205,9 @@ void static destruct_uv_loop(zend_object *obj) uv_run(loop, UV_RUN_DEFAULT); uv_loop_close(loop); } + if (loop_obj->gc_buffer) { + efree(loop_obj->gc_buffer); + } } void static clean_uv_handle(php_uv_t *uv) { diff --git a/tests/320-fs-event.phpt b/tests/320-fs-event.phpt index 098cf78..1101876 100644 --- a/tests/320-fs-event.phpt +++ b/tests/320-fs-event.phpt @@ -3,9 +3,9 @@ Check for fs event --FILE--