netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: Netfilter Development Mailing list
	<netfilter-devel@vger.kernel.org>,
	Giuseppe Longo <giuseppelng@gmail.com>
Subject: Re: [libnftables PATCH 1/2] src: add _unset functions
Date: Thu, 6 Jun 2013 13:45:45 +0200	[thread overview]
Message-ID: <20130606114545.GB9922@localhost> (raw)
In-Reply-To: <CAOkSjBi5B8pHLF2+Kt3eqL71+jqNXWJOJHPq6FZ+O4Wti+TBzQ@mail.gmail.com>

On Thu, Jun 06, 2013 at 12:35:01PM +0200, Arturo Borrero Gonzalez wrote:
> 2013/6/6 Pablo Neira Ayuso <pablo@netfilter.org>:
> >
> > To unset, use:
> >
> > x->flags &= ~(1 << attr)
> 
> Nice. I'm with v2.
> 
> What about the data being freed? Is that desirable?

If the attribute is unset and the memory area is dynamically
allocated, you have to release it, yes. I think it's also a good idea
if you set that pointer to NULL as a bugtrap as well.

      reply	other threads:[~2013-06-06 11:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 21:37 [libnftables PATCH 1/2] src: add _unset functions Arturo Borrero
2013-06-05 21:37 ` [libnftables PATCH 2/2] examples: unset chain & rule handle Arturo Borrero
2013-06-06 10:15 ` [libnftables PATCH 1/2] src: add _unset functions Pablo Neira Ayuso
2013-06-06 10:35   ` Arturo Borrero Gonzalez
2013-06-06 11:45     ` 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=20130606114545.GB9922@localhost \
    --to=pablo@netfilter.org \
    --cc=arturo.borrero.glez@gmail.com \
    --cc=giuseppelng@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 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).