Re: [nft PATCH 2/2] Add support for table's persist flag

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

 



On Mon, Mar 25, 2024 at 02:33:48PM +0100, Quentin Deslandes wrote:
> On 2024-03-22 16:48, Phil Sutter wrote:
[...]
> > diff --git a/src/parser_bison.y b/src/parser_bison.y
> > index bdb73911759c8..1ade7417f8d6a 100644
> > --- a/src/parser_bison.y
> > +++ b/src/parser_bison.y
[...]
> > @@ -1930,6 +1921,31 @@ table_options		:	FLAGS		STRING
> >  			}
> >  			;
> >  
> > +table_flags		:	table_flag
> > +			|	table_flags	COMMA	table_flag
> > +			{
> > +				$$ = $1 | $3;
> > +			}
> > +			;
> > +table_flag		:	STRING
> > +			{
> > +				if (strcmp($1, "dormant") == 0) {
> > +					$$ = TABLE_F_DORMANT;
> > +					free_const($1);
> > +				} else if (strcmp($1, "owner") == 0) {
> > +					$$ = TABLE_F_OWNER;
> 
> Don't you need to free_const($1) here too?

Oh yes, thanks for spotting it! Guess I messed up some c'n'p here, the
code is really obvious.

Thanks, Phil




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

  Powered by Linux