diff options
author | des <des@FreeBSD.org> | 2000-07-09 10:14:22 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2000-07-09 10:14:22 +0000 |
commit | 7613572c34a3408c2a2d41b1adadc420daa015d6 (patch) | |
tree | 68ad0b1c43fe2b7b285aecd7d577de187b3815c8 /usr.bin/fetch/fetch.c | |
parent | 363b5efd7aac1c44f8ca46456de96c58f07d65da (diff) | |
download | FreeBSD-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/fetch.c')
-rw-r--r-- | usr.bin/fetch/fetch.c | 3 |
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; } |