summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 02b773dcb951..aab2033e9067 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;
}