summaryrefslogtreecommitdiff
path: root/src/replication.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/replication.c')
-rw-r--r--src/replication.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/replication.c b/src/replication.c
index 6be5d2631..b31f0da9f 100644
--- a/src/replication.c
+++ b/src/replication.c
@@ -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. */