Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b114fc2

Browse files
Use pecalloc for consistency
1 parent 0d6d3fd commit b114fc2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cluster_library.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ redisCachedCluster *cluster_cache_create(zend_string *hash, HashTable *nodes) {
928928
/* Attach any slave nodes we have. */
929929
if (node->slaves) {
930930
/* Allocate memory for slaves */
931-
cm->slave = pemalloc(sizeof(*cm->slave) * zend_hash_num_elements(node->slaves), 1);
931+
cm->slave = pecalloc(zend_hash_num_elements(node->slaves), sizeof(*cm->slave), 1);
932932

933933
/* Copy host/port information for each slave */
934934
ZEND_HASH_FOREACH_PTR(node->slaves, slave) {

0 commit comments

Comments
 (0)