From nobody Wed Sep 06 21:56:42 2023 X-Original-To: dev-commits-src-branches@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 4Rgx6M1pdkz4sJ2V; Wed, 6 Sep 2023 21:56:43 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rgx6M1B7Pz3bGg; Wed, 6 Sep 2023 21:56:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694037403; 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=eq+xx2E9IbimjWhgZOkX9i6zPHTzO0s10oyVhH242Ps=; b=ezu1shfk1fA4izQGAOakXIC0VqQrW2MXVup4aLxxqRa8NZqVqHzH1vPtoVyMqXWySrIG5l Z9TECUh2mGcNUN7xBp6HJW67pcY7yBMJalPnb5XBvnAE5I2Q94WuxJ1xLLkbEp6hwXmj+Y GSbsX8WHaNIaRf6Hlx7U0JwpZZHwi+tbIJWKBR16iWlfunl0sZrujX1wdoxJK5SeBhY75i wwqrZDVaPNWdZvm7R7ZCgcSJ9XeMReKKcXKPhZ4Khg5yFtDjrQtjCKdvCAGwXHnqk4uq/n OpmFAl7GYGbxXaJ+Avz62uQ+IuH/DJcxisltO5n/wiRvi48IguxPlhZYyj4+ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694037403; a=rsa-sha256; cv=none; b=tH4li+4usPtSM01bGmoKvWW3jwX1bgwohVuAn12e5DVvFNOkzD7cpN/6Mf3xeyqllADGkc 9zdcuqntRRF+waWPIWEizu7kW5gNfhmNN22KB++3zCNJHVZB+WV09QtU1im+IsqV23N9bE 4obzoAI3S3ViBLTu0I/A1l3vIm3OH6g2lk669VuliGeeGDtp1qdsRoA58PW+VyxZpsY94C WSoh48H+b/v6m0XSP/T3Z3T/QOjBYD3Ty/VyHQz6L9hKMKd9UEpQXmH3/J6Rmp+dnZQ1ku HoTKeQSeS1DvDFpDxsvqFz9SYmwQKnvW00nHSqbpI1yH/nCN3DKxqOq0PwweKA== 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=1694037403; 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=eq+xx2E9IbimjWhgZOkX9i6zPHTzO0s10oyVhH242Ps=; b=XkZ2CPeCzhQhv/pdtdJanK/Pqx357PNoLznHui91pZG4DG9q6rknFylogtRSvqqNjC8KEL Of1tftMlcoQNV8Q7qd7Z/nFS3Ui9NRb1cBIHHdfbekhiUDs8qTXvpBcSAmObgxDaNbDqTi veU0Mcoi5Z4/ECbdmFW9VbBlqjjlSdgOYGxsA+PQhOiZZqHLn5FsCePxHQTFIhSxFkb+mb +Fj+1kwVyA65t4yTjp93saIeN1rDQCG8dTuOVcsKB5CZdk8qz/tzord4duILnpoCQB7i8+ aUWkOXzgE0O+B9m7TzMuDdg6FrVilg43u+O9C/YWlICBfYasBOOV4yRxnd1mqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rgx6L72X1zYrt; Wed, 6 Sep 2023 21:56:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 386Lug0T022862; Wed, 6 Sep 2023 21:56:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 386LugsS022859; Wed, 6 Sep 2023 21:56:42 GMT (envelope-from git) Date: Wed, 6 Sep 2023 21:56:42 GMT Message-Id: <202309062156.386LugsS022859@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b086848fc086 - stable/13 - libpfctl: Don't pass stack garbage to free. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b086848fc0862468cba5d736f60f2882b2119c30 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b086848fc0862468cba5d736f60f2882b2119c30 commit b086848fc0862468cba5d736f60f2882b2119c30 Author: John Baldwin AuthorDate: 2023-03-22 19:33:59 +0000 Commit: John Baldwin CommitDate: 2023-09-06 21:56:09 +0000 libpfctl: Don't pass stack garbage to free. GCC 9 on stable/12 reports a -Wmaybe-uninitialized error for the call to free in _pfctl_clear_states. Reviewed by: mjg Differential Revision: https://reviews.freebsd.org/D39198 (cherry picked from commit 48c519be0e8005aedc817b1bc1101ad32b67a67a) --- lib/libpfctl/libpfctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index ae0e63818335..6ade20fcd990 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -922,7 +922,6 @@ static int _pfctl_clear_states(int dev, const struct pfctl_kill *kill, unsigned int *killed, uint64_t ioctlval) { - struct pfioc_nv nv; nvlist_t *nvl; int ret; @@ -945,7 +944,6 @@ _pfctl_clear_states(int dev, const struct pfctl_kill *kill, *killed = nvlist_get_number(nvl, "killed"); nvlist_destroy(nvl); - free(nv.data); return (ret); }