netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jan Engelhardt <jengelh@inai.de>
Cc: "Zaman, Imran" <imran.zaman@intel.com>,
	"netfilter-devel@vger.kernel.org"
	<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH v1 1/1] fix: resource leakage when loading library using dlopen
Date: Tue, 8 Sep 2015 12:38:41 +0200	[thread overview]
Message-ID: <20150908103841.GA3605@salvia> (raw)
In-Reply-To: <alpine.LSU.2.20.1509081051090.24872@nerf40.vanv.qr>

On Tue, Sep 08, 2015 at 10:55:30AM +0200, Jan Engelhardt wrote:
> On Tuesday 2015-09-08 09:02, Zaman, Imran wrote:
> 
> >Well! I tend to disagree here..
> >
> >Any resource should be freed immediately if it is not in use..
> 
> Yet they are in use until xtables-main.c:78 or so.

This lazy resource approach is sloppy. It's a good practise to release
things before leaving the program. By releasing things when we don't
need them anymore, we reduce the noise in valgrind and similar tools
so it becomes more easily to detect more significant problems in the
software.

Imran, please fix your patch to avoid the crash that was indicated in
first place and resubmit, thanks.

      parent reply	other threads:[~2015-09-08 10:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 10:42 [PATCH v1 1/1] fix: resource leakage when loading library using dlopen Imran Zaman
2015-09-07 10:41 ` Jan Engelhardt
2015-09-07 10:52   ` Zaman, Imran
2015-09-07 13:08     ` Jan Engelhardt
2015-09-08  7:02       ` Zaman, Imran
2015-09-08  8:55         ` Jan Engelhardt
2015-09-08  9:50           ` Zaman, Imran
2015-09-08 10:05             ` Jan Engelhardt
2015-09-08 10:38           ` Pablo Neira Ayuso [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=20150908103841.GA3605@salvia \
    --to=pablo@netfilter.org \
    --cc=imran.zaman@intel.com \
    --cc=jengelh@inai.de \
    --cc=netfilter-devel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).