All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Leblond <eric@inl.fr>
To: Anton <anton.vazir@gmail.com>
Cc: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>
Subject: Re: nlif_open() - nlif_close() - memory leak?
Date: Thu, 22 May 2008 09:43:19 +0200	[thread overview]
Message-ID: <20080522074319.GD7436@bayen.regit.org> (raw)
In-Reply-To: <200805221053.41058.anton.vazir@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

Hello,

On Thursday, 2008 May 22 at 10:53:40 +0500, Anton wrote:
> Hello!
> 
> Just doing some testuing of NFQUEUE, and noticed that in the 
> simple case, if I do the following (yes, there is 
> no "nlif_catch", but anyway) - I'm experiencing a memory 
> leak for every open - close cycle?
> Anything I'm missing?
> 
>        struct nlif_handle *h;
>         h = nlif_open();
>         if (h != NULL) {
>          nlif_query(h);
>          nfq_get_indev_name(h,tb,agg.iname);
>          nfq_get_outdev_name(h,tb,agg.oname);
>          nlif_close(h);
>         }

You should not call nlif_open, nlif_close at each resolution:

Information about nlif usage:
http://software.inl.fr/trac/wiki/articles/using_nlif

Anyway, I will investigate to see what's going on. We definitely should
not have a memory leak.

BR,
-- 
Eric Leblond
INL: http://www.inl.fr/
NuFW: http://www.nufw.org/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-05-22  7:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-22  5:53 nlif_open() - nlif_close() - memory leak? Anton
2008-05-22  7:43 ` Eric Leblond [this message]
2008-05-22  7:52   ` Anton
2008-05-22  8:07     ` Eric Leblond
  -- strict thread matches above, loose matches on Subject: below --
2008-05-22 10:00 Anton
2008-05-22 12:48 ` Eric Leblond
2008-05-22 13:08   ` Pablo Neira Ayuso
2008-05-22 14:11     ` Eric Leblond

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=20080522074319.GD7436@bayen.regit.org \
    --to=eric@inl.fr \
    --cc=anton.vazir@gmail.com \
    --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 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.