8000 RedisArray segfault fix · jrtkcoder/phpredis@635c3a6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 635c3a6

Browse files
committed
RedisArray segfault fix
1 parent ff549ab commit 635c3a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redis_array_impl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ ra_make_array(HashTable *hosts, zval *z_fun, zval *z_dist, HashTable *hosts_prev
341341
ra->pconnect = b_pconnect;
342342
ra->connect_timeout = connect_timeout;
343343

344-
if (ra_load_hosts(ra, hosts, retry_interval, b_lazy_connect TSRMLS_CC) == NULL) {
344+
if (ra_load_hosts(ra, hosts, retry_interval, b_lazy_connect TSRMLS_CC) == NULL || !ra->count) {
345345
for (i = 0; i < ra->count; ++i) {
346346
zval_dtor(&ra->redis[i]);
347347
efree(ra->hosts[i]);

0 commit comments

Comments
 (0)
0