summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-01-07 19:04:48 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-01-07 19:04:48 +0000
commit618767322006a704423495f02d6c0c9473b0838e (patch)
treeeae078f85fc763073c178b851c0b7f840bc9527d
parent0188d2f48e2efa17ac1c95c66633ed313bf0b300 (diff)
missing free, stevesk@pobox.com
-rw-r--r--usr.bin/ssh/cli.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/cli.c b/usr.bin/ssh/cli.c
index ab9a7dcf2f0..05f061b0e03 100644
--- a/usr.bin/ssh/cli.c
+++ b/usr.bin/ssh/cli.c
@@ -1,5 +1,5 @@
#include "includes.h"
-RCSID("$OpenBSD: cli.c,v 1.2 2000/10/16 09:38:44 djm Exp $");
+RCSID("$OpenBSD: cli.c,v 1.3 2001/01/07 19:04:47 markus Exp $");
#include "xmalloc.h"
#include "ssh.h"
@@ -146,9 +146,12 @@ cli_write(char* buf, int size)
for (pos = 0; pos < len; pos += ret) {
ret = write(cli_output, output + pos, len - pos);
- if (ret == -1)
+ if (ret == -1) {
+ xfree(output)
return -1;
+ }
}
+ xfree(output)
return 0;
}