svn commit: r278564 - stable/10/usr.sbin/pkg

Baptiste Daroussin bapt at FreeBSD.org
Wed Feb 11 08:20:09 UTC 2015


Author: bapt
Date: Wed Feb 11 08:20:07 2015
New Revision: 278564
URL: https://svnweb.freebsd.org/changeset/base/278564

Log:
  MFC: r278173
  Test the return of fetchParseURL(3)
  
  CID:		1125811

Modified:
  stable/10/usr.sbin/pkg/pkg.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/pkg/pkg.c
==============================================================================
--- stable/10/usr.sbin/pkg/pkg.c	Wed Feb 11 08:07:32 2015	(r278563)
+++ stable/10/usr.sbin/pkg/pkg.c	Wed Feb 11 08:20:07 2015	(r278564)
@@ -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 &&


More information about the svn-src-stable mailing list