diff options
author | bapt <bapt@FreeBSD.org> | 2015-02-11 08:20:07 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-02-11 08:20:07 +0000 |
commit | a0d89550fee068b0fa14414ba118aafdb7e9fbcc (patch) | |
tree | 4324e66e633fc1b542ab72b76dd36196030ca932 /usr.sbin/pkg | |
parent | 1e06417cb0344ba79c156ce70b69e9db1da17e26 (diff) | |
download | FreeBSD-src-a0d89550fee068b0fa14414ba118aafdb7e9fbcc.zip FreeBSD-src-a0d89550fee068b0fa14414ba118aafdb7e9fbcc.tar.gz |
MFC: r278173
Test the return of fetchParseURL(3)
CID: 1125811
Diffstat (limited to 'usr.sbin/pkg')
-rw-r--r-- | usr.sbin/pkg/pkg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c index dc4f772..09be1c5 100644 --- a/usr.sbin/pkg/pkg.c +++ b/usr.sbin/pkg/pkg.c @@ -202,7 +202,11 @@ fetch_to_fd(const char *url, char *path) retry = max_retry; - u = fetchParseURL(url); + if ((u = fetchParseURL(url)) == NULL) { + warn("fetchParseURL('%s')", url); + return (-1); + } + while (remote == NULL) { if (retry == max_retry) { if (strcmp(u->scheme, "file") != 0 && |