Date: Wed, 10 Sep 2025 15:24:20 -0600 From: Warner Losh <imp@bsdimp.com> To: John Baldwin <jhb@freebsd.org> Cc: Warner Losh <imp@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a930cc8bad64 - main - GEOM_UNION: Should free sc in g_union_ctl_create when error happened. Message-ID: <CANCZdfocVksYfMSFA7xnZDnVu_9HshznmKK_q7z61rG=ousgjQ@mail.gmail.com> In-Reply-To: <e5aa0f41-3926-40f6-938b-4e433e9528ca@FreeBSD.org> References: <202509051842.585IgHAr096237@gitrepo.freebsd.org> <e5aa0f41-3926-40f6-938b-4e433e9528ca@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <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=3Da930cc8bad644039cfcfa5ff7c6fe3e= 8548aa9ae > > > > commit a930cc8bad644039cfcfa5ff7c6fe3e8548aa9ae > > Author: Wuyang Chung <wy-chung@outlook.com> > > AuthorDate: 2025-09-02 06:23:26 +0000 > > Commit: Warner Losh <imp@FreeBSD.org> > > 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 <wy-chung@outlook.com> > > 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 <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote g= mail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Sep 5, = 2025 at 1:37=E2=80=AFPM John Baldwin <<a href=3D"mailto:jhb@freebsd.org"= >jhb@freebsd.org</a>> wrote:<br></div><blockquote class=3D"gmail_quote" = style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa= dding-left:1ex">On 9/5/25 14:42, Warner Losh wrote:<br> > The branch main has been updated by imp:<br> > <br> > URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3Da930cc8bad64= 4039cfcfa5ff7c6fe3e8548aa9ae" rel=3D"noreferrer" target=3D"_blank">https://= cgit.FreeBSD.org/src/commit/?id=3Da930cc8bad644039cfcfa5ff7c6fe3e8548aa9ae<= /a><br> > <br> > commit a930cc8bad644039cfcfa5ff7c6fe3e8548aa9ae<br> > Author:=C2=A0 =C2=A0 =C2=A0Wuyang Chung <<a href=3D"mailto:wy-chung= @outlook.com" target=3D"_blank">wy-chung@outlook.com</a>><br> > AuthorDate: 2025-09-02 06:23:26 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2025-09-05 18:42:20 +0000<br> > <br> >=C2=A0 =C2=A0 =C2=A0 GEOM_UNION: Should free sc in g_union_ctl_create w= hen error happened.<br> >=C2=A0 =C2=A0 =C2=A0 <br> >=C2=A0 =C2=A0 =C2=A0 Signed-off-by: Wuyang Chung <<a href=3D"mailto:= wy-chung@outlook.com" target=3D"_blank">wy-chung@outlook.com</a>><br> >=C2=A0 =C2=A0 =C2=A0 Reviewed by: imp<br> >=C2=A0 =C2=A0 =C2=A0 Pull Request: <a href=3D"https://github.com/freebs= d/freebsd-src/pull/1835" rel=3D"noreferrer" target=3D"_blank">https://githu= b.com/freebsd/freebsd-src/pull/1835</a><br> > ---<br> >=C2=A0 =C2=A0sys/geom/union/g_union.c | 1 +<br> >=C2=A0 =C2=A01 file changed, 1 insertion(+)<br> > <br> > diff --git a/sys/geom/union/g_union.c b/sys/geom/union/g_union.c<br> > index 9734fc1bcfe3..0701e76db671 100644<br> > --- a/sys/geom/union/g_union.c<br> > +++ b/sys/geom/union/g_union.c<br> > @@ -358,6 +358,7 @@ fail2:<br> >=C2=A0 =C2=A0fail1:<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0g_destroy_consumer(lowercp);<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0g_destroy_provider(newpp);<br> > +=C2=A0 =C2=A0 =C2=A0g_free(sc);<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0g_destroy_geom(gp);<br> >=C2=A0 =C2=A0}<br> <br> Hmm, as markj@ noted in the review, this also needs an `rw_destroy`.<br></b= lockquote><div><br></div><div>Fixed in=C2=A043b8c4e451196c5a5014679cf6e5d45= 9bf330928. Thanks for the reminder.</div><div><br></div><div>Warner=C2=A0</= div></div></div> --000000000000e5943b063e790b5f--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfocVksYfMSFA7xnZDnVu_9HshznmKK_q7z61rG=ousgjQ>