summaryrefslogtreecommitdiffstats
path: root/usr.bin/fetch
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2000-07-09 10:14:22 +0000
committerdes <des@FreeBSD.org>2000-07-09 10:14:22 +0000
commit7613572c34a3408c2a2d41b1adadc420daa015d6 (patch)
tree68ad0b1c43fe2b7b285aecd7d577de187b3815c8 /usr.bin/fetch
parent363b5efd7aac1c44f8ca46456de96c58f07d65da (diff)
downloadFreeBSD-src-7613572c34a3408c2a2d41b1adadc420daa015d6.zip
FreeBSD-src-7613572c34a3408c2a2d41b1adadc420daa015d6.tar.gz
Don't segfault if given an invalid URL (doh!)
Submitted by: green
Diffstat (limited to 'usr.bin/fetch')
-rw-r--r--usr.bin/fetch/fetch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c
index 02b773d..aab2033 100644
--- a/usr.bin/fetch/fetch.c
+++ b/usr.bin/fetch/fetch.c
@@ -400,7 +400,8 @@ fetch(char *URL, char *path)
fclose(f);
if (of && of != stdout)
fclose(of);
- fetchFreeURL(url);
+ if (url)
+ fetchFreeURL(url);
return r;
}
OpenPOWER on IntegriCloud