From nobody Wed Sep 10 21:24:20 2025 X-Original-To: dev-commits-src-main@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 4cMYc14Ts9z66tnT for ; Wed, 10 Sep 2025 21:24:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cMYc06cgCz48gV for ; Wed, 10 Sep 2025 21:24:32 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=JZq00cOt; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::1029) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-329a41dc2ebso3376a91.3 for ; Wed, 10 Sep 2025 14:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1757539472; x=1758144272; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ATjxCMV2rM7ZbcqDVqiOJR2SB9jYogFUKbBko6YBZgE=; b=JZq00cOtjNXwCxnnerL5/i6RpU/2VCFdbI06tUEaMXsVyoH5sAKjXf/p38bY/30ueh CBRzXmWb8zVstpAg6R/AXaEoWU5IyJFd/a0NkD3vfNzB5/psPLQMVbeePFdn4oM4og7g RTGLSH9KtwZNW1w9QOkQ3QZzkP/A75G8dt7RayatwFU6nor9mtIlekTkzhpq5+iEefry V1tOGA0oUMUQquhxidmnaWYYUVziQkEHIRSoUVCpyRmrCFseGXJ8n/h8dPLtVh/ygSu0 JVw0K/87kXLB5koOiF+zkzPcGZFE4IBnviYp8pqUBpsZ0Mbuuy+NAhZZ2S10dx2mOEgx SDbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757539472; x=1758144272; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ATjxCMV2rM7ZbcqDVqiOJR2SB9jYogFUKbBko6YBZgE=; b=nNWKSvexYQhKo4hjFhP0MVZTHVZ2hg+SybUthoSR5GRPSAjrnblLVThrXjf2e9ohQ8 AF0LtovbA6K7JNRbsloN4eGGY3g99Mxm76sW5/2ivhbHakEZZ6KJohrG7AWY2lrAjCvm +0853aMLPPvPMrbuDhf/dCth3m2udo5AUAdt7w/rRa2FfIVzl5y+6vYLw+sTeeN2mgrU fASoWz930886Kfv+WUPwiGQtZ1AjVgnycM2OMnFoI+YWU2P8Jr6MNjj/Kf3BXn7qjNkP KzNFySboBq/DJYjii1CRHa4kcj5Qg3dpMnDZ6B3V38tSuBOZYqA+CkbGfQKVhwO62zbb 3M5g== X-Forwarded-Encrypted: i=1; AJvYcCXZFMbr4cyVA8hurObloX/r+f18Z19DBnEQqO+7tkYeQp/ZyFP7C87bwBCswbkFP6KTLtb4/semswL1x1OQiS3en21CAA==@freebsd.org X-Gm-Message-State: AOJu0YyV1UGF740X1gQbqi92FimEOfN6Kw04zqkYxCjEIKQx3d+K+gRe EucPf8Wv4/S4LFKMccidrYZM/Wo40gkx8qTzn6pI58CcQ5ptt4xNUuMsYv4Hb0FlVmk1dVOPvqa gLxrnwW7gu+x6M5wB+dxy7u/k3+9YaATn+CP6r9HHvg== X-Gm-Gg: ASbGncvi3lggGwQqs/u009JQ80zobppbh4GHV2qgHmnd9vESRnl0dHqTF17sqqNwK/e UQuNqfwGC3vCQ46HLNkYfRUwb5nbeEe9xqX9GXbfIWOBS9EoADaWKZV/xmXrVHvp2LyvIfGTtW6 PMXJEGkcOKV4kR0eAZ3Zy0C2Gy0N+9uRzmwf0zmSDVGfCm38t3O10h7n//1OvNyydjnO0g8pLk/ fo2WQAJfVfM6O5/ANcbopy9YWfFEmIKbNipslgZPPhOikyuu/+QeohqonHR X-Google-Smtp-Source: AGHT+IHBeCaRpY2gxknf7inzNUPYlOXoSfSizZ7aaFd8+VgplWLhv3nfJFKC2FFCU/rlfCuco6TkRy3D6O+HDtmbMUo= X-Received: by 2002:a17:90b:5344:b0:32b:7082:b2 with SMTP id 98e67ed59e1d1-32d43f7ddc1mr23489239a91.23.1757539471818; Wed, 10 Sep 2025 14:24:31 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509051842.585IgHAr096237@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 10 Sep 2025 15:24:20 -0600 X-Gm-Features: Ac12FXwWPHd9esiptMTGbfbF6siLPNumMn8xMFnXKB132LIgZFgH5Bxieu6APIY Message-ID: Subject: Re: git: a930cc8bad64 - main - GEOM_UNION: Should free sc in g_union_ctl_create when error happened. To: John Baldwin Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e5943b063e790b5f" X-Spamd-Bar: -- X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1029:from]; DMARC_NA(0.00)[bsdimp.com]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; R_SPF_NA(0.00)[no SPF record]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4cMYc06cgCz48gV --000000000000e5943b063e790b5f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Sep 5, 2025 at 1:37=E2=80=AFPM John Baldwin wrote= : > On 9/5/25 14:42, Warner Losh wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Da930cc8bad644039cfcfa5ff7c6fe3e= 8548aa9ae > > > > commit a930cc8bad644039cfcfa5ff7c6fe3e8548aa9ae > > Author: Wuyang Chung > > AuthorDate: 2025-09-02 06:23:26 +0000 > > Commit: Warner Losh > > CommitDate: 2025-09-05 18:42:20 +0000 > > > > GEOM_UNION: Should free sc in g_union_ctl_create when error > happened. > > > > Signed-off-by: Wuyang Chung > > Reviewed by: imp > > Pull Request: https://github.com/freebsd/freebsd-src/pull/1835 > > --- > > sys/geom/union/g_union.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/sys/geom/union/g_union.c b/sys/geom/union/g_union.c > > index 9734fc1bcfe3..0701e76db671 100644 > > --- a/sys/geom/union/g_union.c > > +++ b/sys/geom/union/g_union.c > > @@ -358,6 +358,7 @@ fail2: > > fail1: > > g_destroy_consumer(lowercp); > > g_destroy_provider(newpp); > > + g_free(sc); > > g_destroy_geom(gp); > > } > > Hmm, as markj@ noted in the review, this also needs an `rw_destroy`. > Fixed in 43b8c4e451196c5a5014679cf6e5d459bf330928. Thanks for the reminder. Warner --000000000000e5943b063e790b5f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Sep 5, = 2025 at 1:37=E2=80=AFPM John Baldwin <jhb@freebsd.org> wrote:
On 9/5/25 14:42, Warner Losh wrote:
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3Da930cc8bad644039cfcfa5ff7c6fe3e8548aa9ae<= /a>
>
> commit a930cc8bad644039cfcfa5ff7c6fe3e8548aa9ae
> Author:=C2=A0 =C2=A0 =C2=A0Wuyang Chung <
wy-chung@outlook.com>
> AuthorDate: 2025-09-02 06:23:26 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2025-09-05 18:42:20 +0000
>
>=C2=A0 =C2=A0 =C2=A0 GEOM_UNION: Should free sc in g_union_ctl_create w= hen error happened.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 Signed-off-by: Wuyang Chung <wy-chung@outlook.com>
>=C2=A0 =C2=A0 =C2=A0 Reviewed by: imp
>=C2=A0 =C2=A0 =C2=A0 Pull Request: https://githu= b.com/freebsd/freebsd-src/pull/1835
> ---
>=C2=A0 =C2=A0sys/geom/union/g_union.c | 1 +
>=C2=A0 =C2=A01 file changed, 1 insertion(+)
>
> diff --git a/sys/geom/union/g_union.c b/sys/geom/union/g_union.c
> index 9734fc1bcfe3..0701e76db671 100644
> --- a/sys/geom/union/g_union.c
> +++ b/sys/geom/union/g_union.c
> @@ -358,6 +358,7 @@ fail2:
>=C2=A0 =C2=A0fail1:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0g_destroy_consumer(lowercp);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0g_destroy_provider(newpp);
> +=C2=A0 =C2=A0 =C2=A0g_free(sc);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0g_destroy_geom(gp);
>=C2=A0 =C2=A0}

Hmm, as markj@ noted in the review, this also needs an `rw_destroy`.

Fixed in=C2=A043b8c4e451196c5a5014679cf6e5d45= 9bf330928. Thanks for the reminder.

Warner=C2=A0
--000000000000e5943b063e790b5f--