diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2006-03-19 02:22:57 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2006-03-19 02:22:57 +0000 |
commit | 6b41cc007e50e8bc65a180e781f91841a3babc13 (patch) | |
tree | e293f79a72fcaf2e61c6cb5e8294da379fa31a1f | |
parent | 793779b49397bdcbe037f3c69be474ac60158557 (diff) |
more memory leaks detected by Coverity via elad AT netbsd.org;
deraadt@ ok
-rw-r--r-- | usr.bin/ssh/sftp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index 9691f634b93..a0d39b2fc6a 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -15,7 +15,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.75 2006/02/20 17:19:54 stevesk Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.76 2006/03/19 02:22:56 djm Exp $"); #include <sys/ioctl.h> #include <sys/types.h> @@ -1277,6 +1277,7 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2) if (parse_dispatch_command(conn, cmd, &pwd, 1) != 0) { xfree(dir); xfree(pwd); + xfree(conn); return (-1); } } else { @@ -1289,6 +1290,7 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2) err = parse_dispatch_command(conn, cmd, &pwd, 1); xfree(dir); xfree(pwd); + xfree(conn); return (err); } xfree(dir); @@ -1345,6 +1347,7 @@ interactive_loop(int fd_in, int fd_out, char *file1, char *file2) break; } xfree(pwd); + xfree(conn); if (el != NULL) el_end(el); |