File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -282,23 +282,19 @@ create_cluster_context(zend_class_entry *class_type TSRMLS_DC) {
282282 redisCluster * cluster ;
283283
284284 // Allocate our actual struct
285- cluster = emalloc (sizeof (redisCluster ));
286- memset (cluster , 0 , sizeof (redisCluster ));
285+ cluster = ecalloc (1 , sizeof (redisCluster ));
287286#else
288287zend_object *
289288create_cluster_context (zend_class_entry * class_type TSRMLS_DC ) {
290289 redisCluster * cluster ;
291290
292291 // Allocate our actual struct
293- cluster = emalloc ( sizeof (redisCluster ) + sizeof (zval ) * (class_type -> default_properties_count - 1 ));
292+ cluster = ecalloc ( 1 , sizeof (redisCluster ) + sizeof (zval ) * (class_type -> default_properties_count - 1 ));
294293#endif
295294
296295 // We're not currently subscribed anywhere
297296 cluster -> subscribed_slot = -1 ;
298297
299- // Assume we're up initially
300- cluster -> clusterdown = 0 ;
301-
302298 // Allocate our RedisSock we'll use to store prefix/serialization flags
303299 cluster -> flags = ecalloc (1 , sizeof (RedisSock ));
304300
You can’t perform that action at this time.
0 commit comments