Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2b99d77a
Commit
2b99d77a
authored
Aug 30, 2017
by
jianqingdu
Committed by
antirez
Jan 24, 2018
Browse files
fix not call va_end when syncWrite() failed
fix not call va_end when syncWrite() failed in sendSynchronousCommand()
parent
5f9b9e11
Changes
1
Show whitespace changes
Inline
Side-by-side
src/replication.c
View file @
2b99d77a
...
@@ -1330,6 +1330,7 @@ char *sendSynchronousCommand(int flags, int fd, ...) {
...
@@ -1330,6 +1330,7 @@ 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)
...
@@ -1340,7 +1341,6 @@ char *sendSynchronousCommand(int flags, int fd, ...) {
...
@@ -1340,7 +1341,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. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment