From d57d6211de6376ef0ad7277ca6c7dac448427e68 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 8 Aug 2014 11:34:40 +0200 Subject: [PATCH] zero php_ares on alloc --- php_ares.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2