From: "Linus Lüssing" <linus.luessing@web.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCH] alfred: free globals. Fixes memory leak
Date: Tue, 10 Sep 2013 01:16:27 +0200 [thread overview]
Message-ID: <20130909231626.GB6492@Linus-Debian> (raw)
In-Reply-To: <20130909150831.GA11737@pandem0nium>
On Mon, Sep 09, 2013 at 05:08:31PM +0200, Simon Wunderlich wrote:
> Hrm, apart from that this patch lacks a commit message and signoff, what does it help
> freeing stuff just before the program exits? This will free anything automatically
> anyway ...
>
Hm, the advantage of freeing such memory in the code is that
for one thing it makes valgrind happy :P. And this in turn makes
finding "real" memory leaks easier. And besides, isn't it a better
coding style to free such global variables, too?
I think I'd love seeing a PATCHv2 of this one. And I guess only a
short, two sentence commit message should be sufficient as this
isn't a very invasive patch. For instance:
"This patch fixes a non-serious memory leak on program exit by
freeing the memory allocated for the globals variables. This makes
valgrind happy, too.
Signed-off-by: ..."
Cheers, Linus
PS: Sorry, I had a glance over this patch before it got submitted
but even though I should be somehow familiar with the prefered
coding style, I didn't object.
prev parent reply other threads:[~2013-09-09 23:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 1:39 [B.A.T.M.A.N.] [PATCH] alfred: free globals. Fixes memory leak Nils Schneider
2013-09-09 15:08 ` Simon Wunderlich
2013-09-09 23:16 ` Linus Lüssing [this message]
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=20130909231626.GB6492@Linus-Debian \
--to=linus.luessing@web.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox