summaryrefslogtreecommitdiff
path: root/async.c
diff options
context:
space:
mode:
authorFrederik Deweerdt <fdeweerdt@fastly.com>2017-05-15 09:19:21 -0700
committerFrederik Deweerdt <fdeweerdt@fastly.com>2017-05-15 09:20:03 -0700
commit706129a1619430cd0579e186767a6176089240f5 (patch)
treebd71104a42851f8f4a10e191f0c708262692c987 /async.c
parent97cd8157f74674c722dd30360caac1f498fa72ef (diff)
Don't pass a negative value to __redisAsyncCommand if redisFormatSdsCommandArgv fails
Diffstat (limited to 'async.c')
-rw-r--r--async.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/async.c b/async.c
index d955203..a993ff1 100644
--- a/async.c
+++ b/async.c
@@ -676,6 +676,8 @@ int redisAsyncCommandArgv(redisAsyncContext *ac, redisCallbackFn *fn, void *priv
int len;
int status;
len = redisFormatSdsCommandArgv(&cmd,argc,argv,argvlen);
+ if (len < 0)
+ return REDIS_ERR;
status = __redisAsyncCommand(ac,fn,privdata,cmd,len);
sdsfree(cmd);
return status;