From: Carlos Maiolino <cem@kernel.org>
To: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Cc: "djwong@kernel.org" <djwong@kernel.org>,
"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>
Subject: Re: [xfsprogs] mkfs: fixup memory leak on exit
Date: Sun, 11 Oct 2026 09:09:38 +0200 [thread overview]
Message-ID: <ass13wWEOO9woOOw@cronus.toxiclabs.cc> (raw)
In-Reply-To: <e042c937a34eb92afdc0208a2f6571076f096ba6.camel@wdc.com>
On Sun, Oct 11, 2026 at 01:32:58AM +0000, Wilfred Mallawa wrote:
> [snip]
>
> > >
> > > The original patch is more appropriate IMO but seeing as we're
> > > about to
> > > return from main and terminate the process, why do we care? And if
> > > we
> > > do, shouldn't mkfs also free the other getstr() strings attached to
> > > the
> > > cli struct? And shouldn't the exit(1) paths do likewise?
> > >
> > > (To be clear, my answers are "I don't", "no", and "no" but I could
> > > be
> > > convinced.)
> >
> > Leaving them as-is is fine for now, might not be fine in the future,
> > I'd
> > say if we are leaking them, we should fix it, even if it's falling to
> > the end of the program.
> >
>
> Just to clarify, should I can spin up a V2 that frees all of the
> getstr() allocations in xfs_mkfs? or shall we drop this for now?
I'm happy getting rid of leaks even if they are just before we exit().
Final decision is from the maintainer thought. Andrey has been OOO past
few days, so perhaps wait for him to come back and decide?!
Cheers.
next prev parent reply other threads:[~2026-10-11 7:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 10:12 [xfsprogs] mkfs: fixup memory leak on exit Wilfred Mallawa
2026-10-06 10:51 ` Carlos Maiolino
2026-10-06 13:52 ` Wilfred Mallawa
2026-10-06 14:48 ` Darrick J. Wong
2026-10-06 15:20 ` Wilfred Mallawa
2026-10-08 7:17 ` Christoph Hellwig
2026-10-08 11:20 ` Carlos Maiolino
2026-10-11 1:32 ` Wilfred Mallawa
2026-10-11 7:09 ` Carlos Maiolino [this message]
2026-10-12 0:43 ` Wilfred Mallawa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ass13wWEOO9woOOw@cronus.toxiclabs.cc \
--to=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=wilfred.mallawa@wdc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.