From: Michael Wallner Date: Wed, 13 Aug 2014 12:18:37 +0000 (+0200) Subject: fix possible bus error on shutdown when using events X-Git-Tag: RELEASE_2_1_0_RC3~3 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=976b54c3817a2a1f6cc86077a6a5116a0b8f8b18;p=m6w6%2Fext-http fix possible bus error on shutdown when using events --- diff --git a/php_http_client_curl.c b/php_http_client_curl.c index b688497..37f255b 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -1736,6 +1736,9 @@ static void php_http_client_curl_dtor(php_http_client_t *h) #if PHP_HTTP_HAVE_EVENT if (curl->timeout) { + if (event_initialized(curl->timeout) && event_pending(curl->timeout, EV_TIMEOUT, NULL)) { + event_del(curl->timeout); + } efree(curl->timeout); curl->timeout = NULL; }