summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 2e8649fc..0bffdfda 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -878,6 +878,7 @@ int ssh_buffer_unpack_va(struct ssh_buffer_struct *buffer,
for (p = format, count = 0; *p != '\0'; p++, count++) {
/* Invalid number of arguments passed */
if (argc != -1 && count > argc) {
+ va_end(ap_copy);
return SSH_ERROR;
}