From: Michael Wallner Date: Fri, 8 Aug 2014 09:34:40 +0000 (+0200) Subject: zero php_ares on alloc X-Git-Tag: RELEASE_0_8_0~5 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=d57d6211de6376ef0ad7277ca6c7dac448427e68;p=m6w6%2Fext-ares zero php_ares on alloc --- diff --git a/php_ares.c b/php_ares.c index 9d5c809..252c152 100644 --- a/php_ares.c +++ b/php_ares.c @@ -1105,7 +1105,7 @@ static PHP_FUNCTION(ares_init) RETURN_FALSE; } - ares = emalloc(sizeof(php_ares)); + ares = ecalloc(1, sizeof(php_ares)); TSRMLS_SET_CTX(ares->tsrm_ls); zend_llist_init(&ares->queries, sizeof(php_ares_query *), (llist_dtor_func_t) php_ares_query_llist_dtor, 0); php_ares_options_ctor(&ares->options, opt_array ? Z_ARRVAL_P(opt_array) : NULL);