File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -282,23 +282,19 @@ create_cluster_context(zend_class_entry *class_type TSRMLS_DC) {
282
282
redisCluster * cluster ;
283
283
284
284
// Allocate our actual struct
285
- cluster = emalloc (sizeof (redisCluster ));
286
- memset (cluster , 0 , sizeof (redisCluster ));
285
+ cluster = ecalloc (1 , sizeof (redisCluster ));
287
286
#else
288
287
zend_object *
289
288
create_cluster_context (zend_class_entry * class_type TSRMLS_DC ) {
290
289
redisCluster * cluster ;
291
290
292
291
// 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 ));
294
293
#endif
295
294
296
295
// We're not currently subscribed anywhere
297
296
cluster -> subscribed_slot = -1 ;
298
297
299
- // Assume we're up initially
300
- cluster -> clusterdown = 0 ;
301
-
302
298
// Allocate our RedisSock we'll use to store prefix/serialization flags
303
299
cluster -> flags = ecalloc (1 , sizeof (RedisSock ));
304
300
You can’t perform that action at this time.
0 commit comments