Re: [PATCH] univ-init: scalar initializer needs some additional checks

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

 



On Wed, Jun 03, 2020 at 02:01:07AM +0100, Ramsay Jones wrote:
> 
> I applied this patch just now and everything worked fine. In addition,
> the tests from my patch also passed, once I had remembered to add the
> -Wno-universal-initializer to the 'check-command' - because I do not
> have the patch which changes the default for that warning.

I should have added that this patch was meant to be applied before
the one for the default :(
 
> The only thing which gave me pause ...
> 
> > diff --git a/evaluate.c b/evaluate.c
> > index 8d2e68692a48..16553eb3481b 100644
> > --- a/evaluate.c
> > +++ b/evaluate.c
> > @@ -2608,6 +2608,9 @@ static void handle_list_initializer(struct expression *expr,
> >  	struct expression *e, *last = NULL, *top = NULL, *next;
> >  	int jumped = 0;
> >  
> > +	if (expr->zero_init)
> > +		expr->expr_list = NULL;
> 
> ... was the potential memory leak here. (OK it wouldn't be a
> huge leak, but still!).

Well yes [replying to your other mail too). It doesn't matter much here
but it's also easy to free the list, which is what I've done.

Thanks for giving a look at all of this.
Both patches are now applied.
-- Luc



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux