diff options
author | Salvatore Sanfilippo <antirez@gmail.com> | 2018-01-24 10:55:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-24 10:55:25 +0100 |
commit | 4aa2ecd98b5993fcd6967aa002f0f7d8a577735d (patch) | |
tree | 24d89a919b8ec8f382b06fb54e8ccc0d05f00cbb | |
parent | 4bffeda8b03e8e432025524c0e49ed3f5b7b9653 (diff) | |
parent | 498f65ffb77e7fab9c9085394657ba7b46bedde9 (diff) | |
download | redis-4aa2ecd98b5993fcd6967aa002f0f7d8a577735d.tar.gz |
Merge pull request #4269 from jianqingdu/unstable
fix not call va_end() when syncWrite() failed
-rw-r--r-- | src/replication.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/replication.c b/src/replication.c index a9fe1d66a..8c01bfb51 100644 --- a/src/replication.c +++ b/src/replication.c @@ -1330,7 +1330,8 @@ char *sendSynchronousCommand(int flags, int fd, ...) { cmd = sdscat(cmd,arg); } cmd = sdscatlen(cmd,"\r\n",2); - + va_end(ap); + /* Transfer command to the server. */ if (syncWrite(fd,cmd,sdslen(cmd),server.repl_syncio_timeout*1000) == -1) @@ -1340,7 +1341,6 @@ char *sendSynchronousCommand(int flags, int fd, ...) { strerror(errno)); } sdsfree(cmd); - va_end(ap); } /* Read the reply from the server. */ |