From nobody Mon Jul 27 03:44:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4h7kxY5BHvz6mSJ0 for ; Mon, 27 Jul 2026 03:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h7kxY4QQSz3gWk for ; Mon, 27 Jul 2026 03:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785123889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lBkn9Ssm1wd8qx5voebZb5h37Sa/caNvgWgkrksYh0M=; b=jqjaVA6x6tLvuG5Xd1ea6WzUt0NQ4eceO5RdQXXw32gXiOUMvFLhi+793xRW8oWtcDUho/ sCRtSOo9oUwh8BZ5ewznurxTKl7oAXfpbWDbqGu0YGDqbz5ZdZfJLKaHk8gU8UNz/M7lCy f/ScO+T4hqIZl6YIjBNFnDbyvHSxOhj38bfjT8dOWluefn80X53v7TuOlLsaHxmBF4WP4w cVWs9BjUcvI945xVksqkPi2DB55AnzZj17Q/kTpq5DMevyNn9/g+7EL5T2ZuwqWOXlMfGF tlNrpzufjstZDdCw3wSMp4XsVUXKN5Jsr8vyNnDbQqZIJXoeam5FVOHecFsifg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785123889; a=rsa-sha256; cv=none; b=BhhBIag6LV7l0G4yP56kH0Dfn3144VMORTCjejVDXU3jd3fFR29wDp7Nj8G6EEL+S4pOMv RUjfabrLVP7rhEKvuetNP33nYn1wg94T1ywAmjg88Kdn1ioT4Du4Dh5FVLHrk4dUcp+hKg CtusAMOP1Ke9abgAdHXg3dQBfaTVD+eaxh5kJVPTpqFLY763aAfYCah2FVKiJex2AI2tok dZ88z8bBpdRBVORdJD94E5ikxKaWhtxXpANBWThR3WJxmlGv2xwlIeCqe07JYNBDWXUlNO fhC2Ji7GlKxzr6yH9bcX4Zw1xKAaq1G4zL2NzQa/WHgTg/4nCrkTkrNHeHQhmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785123889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lBkn9Ssm1wd8qx5voebZb5h37Sa/caNvgWgkrksYh0M=; b=F08/FAMrPxdIKjzhgSHQlJPdnWCIdhXfpT2lNYQuwIYAPtk0j/Gimr8KZiHsdAGJqRltqp F113gQFBYKV2fYTBnf+JqU9qw9aVvF+CLHecu2MujUP/k8XxRjhYMUfY36biyBKs/NuoFQ AoU5SwQQG/lbCUX9lSa2+IewyivBsguEN0v2Te3Q5m1Wl144VArofnTQnCb4UNIGnHLrwC KKlWxgbVhhCrN/yFTA/r8MhddPmpCQNrMXCAAxlDMnPZgwF3QTm+t13L5ijiRk7m2qCUnu /SlTqx/NzFivayiCg0wbRctmVlQ+xQYB8/ff4MnJoKi6jBmlXTHlCbQYSceaOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h7kxY3Mlczs9F for ; Mon, 27 Jul 2026 03:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1bee9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 27 Jul 2026 03:44:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: cf4bb6f4aa7f - stable/15 - libnetmap: fix error path in nmport_extmem_from_file List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cf4bb6f4aa7f39e66434f73d65bd08261deea792 Auto-Submitted: auto-generated Date: Mon, 27 Jul 2026 03:44:44 +0000 Message-Id: <6a66d42c.1bee9.77c38882@gitrepo.freebsd.org> The branch stable/15 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=cf4bb6f4aa7f39e66434f73d65bd08261deea792 commit cf4bb6f4aa7f39e66434f73d65bd08261deea792 Author: Jose Luis Duran AuthorDate: 2026-07-13 12:23:14 +0000 Commit: Jose Luis Duran CommitDate: 2026-07-27 03:40:43 +0000 libnetmap: fix error path in nmport_extmem_from_file Reviewed by: zlei, vmaffione Obtained from: https://github.com/luigirizzo/netmap/commit/b52a2bcae35e56548acfb0849b248a1e4b0c0c3b MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D58150 (cherry picked from commit fcaf15e54162fe14483fdf4ac28c67c51e424441) --- lib/libnetmap/nmport.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libnetmap/nmport.c b/lib/libnetmap/nmport.c index ec9c6136f0f8..c892c94db32e 100644 --- a/lib/libnetmap/nmport.c +++ b/lib/libnetmap/nmport.c @@ -198,6 +198,7 @@ nmport_extmem_from_file(struct nmport_d *d, const char *fname) errno = ENOMEM; goto fail; } + clnup->up.cleanup = NULL; fd = open(fname, O_RDWR); if (fd < 0) { @@ -215,6 +216,7 @@ nmport_extmem_from_file(struct nmport_d *d, const char *fname) goto fail; } close(fd); + fd = -1; clnup->p = p; clnup->size = mapsize; @@ -230,7 +232,7 @@ fail: if (fd >= 0) close(fd); if (clnup != NULL) { - if (clnup->p != MAP_FAILED) + if (clnup->up.cleanup != NULL) nmport_pop_cleanup(d); else nmctx_free(ctx, clnup);