mirror of
https://github.com/fluencelabs/redis
synced 2025-03-20 17:40:50 +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
202c2ebec4
commit
498f65ffb7
@ -1329,7 +1329,8 @@ char *sendSynchronousCommand(int flags, int fd, ...) {
|
|||||||
cmd = sdscat(cmd,arg);
|
cmd = sdscat(cmd,arg);
|
||||||
}
|
}
|
||||||
cmd = sdscatlen(cmd,"\r\n",2);
|
cmd = sdscatlen(cmd,"\r\n",2);
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
/* Transfer command to the server. */
|
/* Transfer command to the server. */
|
||||||
if (syncWrite(fd,cmd,sdslen(cmd),server.repl_syncio_timeout*1000)
|
if (syncWrite(fd,cmd,sdslen(cmd),server.repl_syncio_timeout*1000)
|
||||||
== -1)
|
== -1)
|
||||||
@ -1339,7 +1340,6 @@ char *sendSynchronousCommand(int flags, int fd, ...) {
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
sdsfree(cmd);
|
sdsfree(cmd);
|
||||||
va_end(ap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read the reply from the server. */
|
/* Read the reply from the server. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user