Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2016-12-06 15:19:06 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2016-12-06 15:19:06 +0300
commit4377c97ee0adb55b33015681598b6198cc0b232e (patch)
treed9a390bd147443da238162f81570f28ba78f72dc /redis_cluster.c
parent0a886fef224a6e8880c4eb5706550d2a36af1fe9 (diff)
Issue #1006
Diffstat (limited to 'redis_cluster.c')
-rw-r--r--redis_cluster.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/redis_cluster.c b/redis_cluster.c
index 1a5e1898..9d8955f4 100644
--- a/redis_cluster.c
+++ b/redis_cluster.c
@@ -2994,13 +2994,13 @@ PHP_METHOD(RedisCluster, rawcommand) {
short slot;
/* Sanity check on our arguments */
- z_args = emalloc(argc * sizeof(zval));
if (argc < 2) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"You must pass at least node information as well as at least a command.");
- efree(z_args);
RETURN_FALSE;
- } else if (zend_get_parameters_array(ht, argc, z_args) == FAILURE) {
+ }
+ z_args = emalloc(argc * sizeof(zval));
+ if (zend_get_parameters_array(ht, argc, z_args) == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Internal PHP error parsing method parameters.");
efree(z_args);
@@ -3022,7 +3022,6 @@ PHP_METHOD(RedisCluster, rawcommand) {
zend_throw_exception(redis_cluster_exception_ce,
"Unable to send command to the specified node", 0 TSRMLS_CC);
efree(cmd);
- efree(z_args);
RETURN_FALSE;
}