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
498f65ff
Commit
498f65ff
authored
Aug 30, 2017
by
jianqingdu
Committed by
GitHub
Aug 30, 2017
Browse files
fix not call va_end when syncWrite() failed
fix not call va_end when syncWrite() failed in sendSynchronousCommand()
parent
202c2ebe
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/replication.c
View file @
498f65ff
...
...
@@ -1329,7 +1329,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
)
...
...
@@ -1339,7 +1340,6 @@ char *sendSynchronousCommand(int flags, int fd, ...) {
strerror
(
errno
));
}
sdsfree
(
cmd
);
va_end
(
ap
);
}
/* 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