mirror of
https://github.com/phpredis/phpredis.git
synced 2026-06-19 07:35:31 +00:00
Fix coverity scan warnings
This commit is contained in:
+5
-1
@@ -77,7 +77,11 @@ ra_load_hosts(RedisArray *ra, HashTable *hosts, long retry_interval, zend_bool b
|
||||
if (!b_lazy_connect)
|
||||
{
|
||||
/* connect */
|
||||
redis_sock_server_open(redis->sock TSRMLS_CC);
|
||||
if (redis_sock_server_open(redis->sock TSRMLS_CC) < 0) {
|
||||
zval_dtor(&z_cons);
|
||||
ra->count = ++i;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
ra->count = ++i;
|
||||
|
||||
+3
-1
@@ -209,7 +209,9 @@ redis_pool_get_sock(redis_pool *pool, const char *key TSRMLS_DC) {
|
||||
if (rpm->auth && rpm->redis_sock->status != REDIS_SOCK_STATUS_CONNECTED) {
|
||||
needs_auth = 1;
|
||||
}
|
||||
redis_sock_server_open(rpm->redis_sock TSRMLS_CC);
|
||||
if (redis_sock_server_open(rpm->redis_sock TSRMLS_CC) < 0) {
|
||||
continue;
|
||||
}
|
||||
if (needs_auth) {
|
||||
redis_pool_member_auth(rpm TSRMLS_CC);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user