mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 09:17:20 +00:00
fix not call va_end when syncWrite() failed
fix not call va_end when syncWrite() failed in sendSynchronousCommand()
This commit is contained in:
parent
5f9b9e1194
commit
2b99d77a57
@ -1330,6 +1330,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)
|
||||
@ -1340,7 +1341,6 @@ char *sendSynchronousCommand(int flags, int fd, ...) {
|
||||
strerror(errno));
|
||||
}
|
||||
sdsfree(cmd);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/* Read the reply from the server. */
|
||||
|
Loading…
Reference in New Issue
Block a user