Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Feb 2026 03:59:33 +0000
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc:        Pavel Knoblokh <info@software-advisory.com.au>
Subject:   git: abf911af2272 - main - pkg: Fix mirror type parsing and service discovery
Message-ID:  <698415a5.45a4e.721a5f80@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=abf911af22729858cc876231e7970eff6aefbb9d

commit abf911af22729858cc876231e7970eff6aefbb9d
Author:     Pavel Knoblokh <info@software-advisory.com.au>
AuthorDate: 2026-02-05 03:59:21 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2026-02-05 03:59:21 +0000

    pkg: Fix mirror type parsing and service discovery
    
    Signed-off-by: Pavel Knoblokh <info@software-advisory.com.au>
    Reviewed by:    emaste, imp, kevans
    Fixes:          dc4581589a3 ("pkg: clean support for repositories")
    Closes:         https://github.com/freebsd/freebsd-src/pull/1989
---
 usr.sbin/pkg/config.c | 3 ++-
 usr.sbin/pkg/pkg.c    | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/usr.sbin/pkg/config.c b/usr.sbin/pkg/config.c
index 6649e75b7f6b..8405a4c658fb 100644
--- a/usr.sbin/pkg/config.c
+++ b/usr.sbin/pkg/config.c
@@ -328,7 +328,8 @@ parse_mirror_type(struct repository *r, const char *mt)
 {
 	if (strcasecmp(mt, "srv") == 0)
 		r->mirror_type = MIRROR_SRV;
-	r->mirror_type = MIRROR_NONE;
+	else
+		r->mirror_type = MIRROR_NONE;
 }
 
 static void
diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c
index 7b0a67e69a4c..33a404474cf2 100644
--- a/usr.sbin/pkg/pkg.c
+++ b/usr.sbin/pkg/pkg.c
@@ -334,6 +334,12 @@ fetchfail:
 	}
 
 cleanup:
+	fetchFreeURL(u);
+	while (mirrors != NULL) {
+		current = mirrors;
+		mirrors = mirrors->next;
+		free(current);
+	}
 	if (remote != NULL)
 		fclose(remote);
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?698415a5.45a4e.721a5f80>