From nobody Mon Jul 13 12:26:34 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 4gzMB80fRwz6l8mf for ; Mon, 13 Jul 2026 12:26:40 +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 4gzMB75FRdz3SBM for ; Mon, 13 Jul 2026 12:26:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783945599; 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=Ps1ozZJBVlIUs9gHHSx50DNV1YKOdlaJjfth7rbCytM=; b=gFsd8RK/fMfwC6t8cDqogVkr7XCnPrJ1jBn78cIzEwf3KOa9Px10e9ROwG9n2Tb0XHBGVu g2NAZ0AE2PQ9qCgZ7YejaxDbWrzBW9+cktrOgLi6BvWhI37a8HhY1cy41JWS7tDVTyk7mE yOfAzGG9v0Wk34oiQ8pUvRDMOa55y42FHofgOHvwM36vzjQDyF1v5J/t4oWUvDfH5HkAsm rU8yLcqAplQIeo50+2NFPoqO6zlVncltVC3FjD4pkBUNFgWvWT7szfCEewrHUOIFS1F5LJ 4KQ+xKFFxSfUAuRetRf8aJyrNFjDAM6MwJQj3RuYZ8sISKPylyRQIAGRn4t5dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783945599; a=rsa-sha256; cv=none; b=AcE6lURtrPa3oChDAmpxI1kewETSAGnQdJIpdNJ2KoJ6kuV6W1Q13yOyhlnXZtA9PigUWz 3Dan05hiGAd8P7Bd3vy/N7rC8Pj3GThu7C14s2Zanx5iSvmns/QoA8zgPiF6n6C+8ZV6n9 2+gXIAFd7fk4gkQOfRfQgLBQodNXKRH1PQyH7a5wPBIUWRGS3IGDyaAw88bOI3vpxX3T1Q P7rk74iXtqW2PzDkfpikXD4jr6kbI7BZ6AdgV5RMNdGe/q/vj8oBC8SijbmpbkDnhwM35Q H7dIvybnE4uN3oMPVdP8HdLCf3SPH1/aXCtVtPR5ld0fbPzRVyoZaufMQpSQdw== 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=1783945599; 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=Ps1ozZJBVlIUs9gHHSx50DNV1YKOdlaJjfth7rbCytM=; b=uolw6Zlb0LzqLgEtZosXEnTeUNIgiDgaXRpwytTcZwuIhHQ2p6nKWrpeUDTdXBlfPfqMtJ fSMwK844wgTv9nU/3+7Q9ojmlxzTTsQJaYlkuTmbbf4Ly7ZCheNeGzvUIrsBvbSlQjgVCV e725K6ci2N0aNim1Fi+pNADa04D3cXKUfM8eC8zdS7aq+DoAncQsGYNLmaH+nHgz7rN5h1 U3yij8riL5z6Ds/ZxcfRPAbJrDTwMB8eIWjlbopNQczC+iUTDjbJcis/jAKp4dfJeTq1h9 opfNKPObFpCBXAsL+VNVyBGKmpCRP8TYw5szwEbehS+8WHK1v8Ojyz2prSXB/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gzMB74KqGzyVQ for ; Mon, 13 Jul 2026 12:26:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2623c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 13 Jul 2026 12:26:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: fcaf15e54162 - main - 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/main X-Git-Reftype: branch X-Git-Commit: fcaf15e54162fe14483fdf4ac28c67c51e424441 Auto-Submitted: auto-generated Date: Mon, 13 Jul 2026 12:26:34 +0000 Message-Id: <6a54d97a.2623c.16c40a36@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=fcaf15e54162fe14483fdf4ac28c67c51e424441 commit fcaf15e54162fe14483fdf4ac28c67c51e424441 Author: Jose Luis Duran AuthorDate: 2026-07-13 12:23:14 +0000 Commit: Jose Luis Duran CommitDate: 2026-07-13 12:23:14 +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 --- 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);