mirror of
https://github.com/phpredis/phpredis.git
synced 2026-06-19 07:35:31 +00:00
Use zend_object_properties_size while creating cluster object
This commit is contained in:
committed by
michael-grunder
parent
e5ead9fc7d
commit
c19e6521b5
+1
-1
@@ -306,7 +306,7 @@ zend_object * create_cluster_context(zend_class_entry *class_type) {
|
||||
redisCluster *cluster;
|
||||
|
||||
// Allocate our actual struct
|
||||
cluster = ecalloc(1, sizeof(redisCluster) + sizeof(zval) * (class_type->default_properties_count - 1));
|
||||
cluster = ecalloc(1, sizeof(redisCluster) + zend_object_properties_size(class_type));
|
||||
|
||||
// We're not currently subscribed anywhere
|
||||
cluster->subscribed_slot = -1;
|
||||
|
||||
Reference in New Issue
Block a user