From 35a5375b67cea187d17dcbf9f667bdf44441e7b0 Mon Sep 17 00:00:00 2001 From: markus Date: Sun, 7 Jan 2001 19:04:47 +0000 Subject: missing free, stevesk@pobox.com --- usr.bin/ssh/cli.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'usr.bin/ssh/cli.c') 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; } -- cgit v1.2.3-59-g8ed1b