summaryrefslogtreecommitdiff
path: root/usr.bin/ftp/fetch.c
diff options
context:
space:
mode:
authorSteven Mestdagh <steven@cvs.openbsd.org>2006-06-23 20:35:26 +0000
committerSteven Mestdagh <steven@cvs.openbsd.org>2006-06-23 20:35:26 +0000
commit007c2b915a9b978140e1c8582c55eeb67cd465ef (patch)
tree5e4574e089ad9eb57a0abad72a0d184c217c0738 /usr.bin/ftp/fetch.c
parenta3bc1e3f60bdf154d8a8841a3716d82df8360025 (diff)
free and sl_free already check against NULL, remove a few unneeded ifs.
ok otto
Diffstat (limited to 'usr.bin/ftp/fetch.c')
-rw-r--r--usr.bin/ftp/fetch.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c
index 4b227dcde9a..7435d736239 100644
--- a/usr.bin/ftp/fetch.c
+++ b/usr.bin/ftp/fetch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fetch.c,v 1.66 2006/06/01 22:42:11 ray Exp $ */
+/* $OpenBSD: fetch.c,v 1.67 2006/06/23 20:35:25 steven Exp $ */
/* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */
/*-
@@ -38,7 +38,7 @@
*/
#if !defined(lint) && !defined(SMALL)
-static const char rcsid[] = "$OpenBSD: fetch.c,v 1.66 2006/06/01 22:42:11 ray Exp $";
+static const char rcsid[] = "$OpenBSD: fetch.c,v 1.67 2006/06/23 20:35:25 steven Exp $";
#endif /* not lint and not SMALL */
/*
@@ -534,12 +534,10 @@ again:
fclose(fin);
else if (s != -1)
close(s);
- if (proxyurl)
- free(proxyurl);
+ free(proxyurl);
free(newline);
rval = url_get(cp, proxyenv, outfile);
- if (buf)
- free(buf);
+ free(buf);
return (rval);
}
}
@@ -636,10 +634,8 @@ cleanup_url_get:
fclose(fin);
else if (s != -1)
close(s);
- if (buf)
- free(buf);
- if (proxyurl)
- free(proxyurl);
+ free(buf);
+ free(proxyurl);
free(newline);
return (rval);
}