summaryrefslogtreecommitdiff
path: root/usr.bin/tftp
diff options
context:
space:
mode:
authorMike Pechkin <mpech@cvs.openbsd.org>2004-02-19 08:43:38 +0000
committerMike Pechkin <mpech@cvs.openbsd.org>2004-02-19 08:43:38 +0000
commit956e26b171e5c1790f2a93afef750e722ff9a12f (patch)
treef40d876445ee0fda0e51ee3b91b26199462d4d22 /usr.bin/tftp
parente4ff99376cc3c89c205a7ebc57ba13b3d00626c9 (diff)
fix mem leak.
hackers@ ok
Diffstat (limited to 'usr.bin/tftp')
-rw-r--r--usr.bin/tftp/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c
index e1d128cf069..f29402bc757 100644
--- a/usr.bin/tftp/main.c
+++ b/usr.bin/tftp/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.21 2003/12/22 22:17:38 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.22 2004/02/19 08:43:37 mpech Exp $ */
/* $NetBSD: main.c,v 1.6 1995/05/21 16:54:10 mycroft Exp $ */
/*
@@ -40,7 +40,7 @@ static const char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
#endif
-static const char rcsid[] = "$OpenBSD: main.c,v 1.21 2003/12/22 22:17:38 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: main.c,v 1.22 2004/02/19 08:43:37 mpech Exp $";
#endif /* not lint */
/* Many bug fixes are from Jim Guyton <guyton@rand-unix> */
@@ -370,6 +370,7 @@ put(int argc, char *argv[])
fd = open(argv[n], O_RDONLY);
if (fd < 0) {
warn("open: %s", argv[n]);
+ free(cp);
continue;
}
if (verbose)