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
[-- Attachment #1 --] On Fri, Sep 5, 2025 at 1:37 PM 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=a930cc8bad644039cfcfa5ff7c6fe3e8548aa9ae > > > > 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 [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Sep 5, 2025 at 1:37 PM John Baldwin <<a href="mailto:jhb@freebsd.org">jhb@freebsd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-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="https://cgit.FreeBSD.org/src/commit/?id=a930cc8bad644039cfcfa5ff7c6fe3e8548aa9ae" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=a930cc8bad644039cfcfa5ff7c6fe3e8548aa9ae</a><br> > <br> > commit a930cc8bad644039cfcfa5ff7c6fe3e8548aa9ae<br> > Author: Wuyang Chung <<a href="mailto:wy-chung@outlook.com" target="_blank">wy-chung@outlook.com</a>><br> > AuthorDate: 2025-09-02 06:23:26 +0000<br> > Commit: Warner Losh <imp@FreeBSD.org><br> > CommitDate: 2025-09-05 18:42:20 +0000<br> > <br> > GEOM_UNION: Should free sc in g_union_ctl_create when error happened.<br> > <br> > Signed-off-by: Wuyang Chung <<a href="mailto:wy-chung@outlook.com" target="_blank">wy-chung@outlook.com</a>><br> > Reviewed by: imp<br> > Pull Request: <a href="https://github.com/freebsd/freebsd-src/pull/1835" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/pull/1835</a><br> > ---<br> > sys/geom/union/g_union.c | 1 +<br> > 1 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> > fail1:<br> > g_destroy_consumer(lowercp);<br> > g_destroy_provider(newpp);<br> > + g_free(sc);<br> > g_destroy_geom(gp);<br> > }<br> <br> Hmm, as markj@ noted in the review, this also needs an `rw_destroy`.<br></blockquote><div><br></div><div>Fixed in 43b8c4e451196c5a5014679cf6e5d459bf330928. Thanks for the reminder.</div><div><br></div><div>Warner </div></div></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfocVksYfMSFA7xnZDnVu_9HshznmKK_q7z61rG=ousgjQ>
