Skip to content

Commit

Permalink
Use pecalloc for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-grunder committed Aug 27, 2019
1 parent 0d6d3fd commit b114fc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster_library.c
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ redisCachedCluster *cluster_cache_create(zend_string *hash, HashTable *nodes) {
/* Attach any slave nodes we have. */
if (node->slaves) {
/* Allocate memory for slaves */
cm->slave = pemalloc(sizeof(*cm->slave) * zend_hash_num_elements(node->slaves), 1);
cm->slave = pecalloc(zend_hash_num_elements(node->slaves), sizeof(*cm->slave), 1);

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

0 comments on commit b114fc2

Please sign in to comment.