Re: [nft PATCH v2 1/3] nft: don't use xzalloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Jul 04, 2019 at 02:41:36PM +0200, Pablo Neira Ayuso wrote:
> On Thu, Jul 04, 2019 at 12:21:23PM +0200, Phil Sutter wrote:
> > Hi Arturo,
> > 
> > On Mon, Jul 01, 2019 at 12:52:48PM +0200, Arturo Borrero Gonzalez wrote:
> > > In the current setup, nft (the frontend object) is using the xzalloc() function
> > > from libnftables, which does not makes sense, as this is typically an internal
> > > helper function.
> > > 
> > > In order to don't use this public libnftables symbol (a later patch just
> > > removes it), let's use calloc() directly in the nft frontend.
> > > 
> > > Signed-off-by: Arturo Borrero Gonzalez <arturo@xxxxxxxxxxxxx>
> > 
> > This series breaks builds for me. Seems you missed xfree() and xmalloc()
> > used in src/main.c and src/cli.c.
> 
> Hm, this did not break here for me.

I was testing my inet-nat config enhancement. The Makefile.am change
caused an automake rerun, maybe that exposed the problem.

> Patch is attached.

Works fine, thanks! I didn't fix it myself because I wasn't sure whether
it makes sense to turn these wrappers into inline functions so both the
library and frontend could use them.

Cheers, Phil



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux