Commit 498f65ff authored by jianqingdu's avatar jianqingdu Committed by GitHub
Browse files

fix not call va_end when syncWrite() failed

fix not call va_end when syncWrite() failed in sendSynchronousCommand()
parent 202c2ebe
......@@ -1329,6 +1329,7 @@ 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)
......@@ -1339,7 +1340,6 @@ char *sendSynchronousCommand(int flags, int fd, ...) {
strerror(errno));
}
sdsfree(cmd);
va_end(ap);
}
/* Read the reply from the server. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment