Re: iked(8): fix some leaks in parse.y

2019-09-26 Thread Sebastian Benoit
Tobias Heider(tobias.hei...@stusta.de) on 2019.09.25 22:34:53 +0200: > > Your fix reads ok, but: > > > > please write null-pointer checks explicitly, i.e. != NULL or == NULL. > > Sure. > > > and a suggestion: how about putting a > > > > if (head == NULL) > > return; > > > > at the top of i

Re: iked(8): fix some leaks in parse.y

2019-09-25 Thread Alexander Bluhm
On Wed, Sep 25, 2019 at 10:34:53PM +0200, Tobias Heider wrote: > Thanks, makes sense. Not sure how I didn't think of this. > Here is a cleaned up version: OK bluhm@ > Index: parse.y > === > RCS file: /cvs/src/sbin/iked/parse.y,v > re

Re: iked(8): fix some leaks in parse.y

2019-09-25 Thread Tobias Heider
> Your fix reads ok, but: > > please write null-pointer checks explicitly, i.e. != NULL or == NULL. Sure. > and a suggestion: how about putting a > > if (head == NULL) > return; > > at the top of iaw_free(), so it works like free()? > > Then you can skip the if (...) infront of all the

Re: iked(8): fix some leaks in parse.y

2019-09-25 Thread Sebastian Benoit
Tobias Heider(tobias.hei...@stusta.de) on 2019.09.25 21:29:44 +0200: > As the subject says this diff fixes a few leaks in the config parser. Your fix reads ok, but: please write null-pointer checks explicitly, i.e. != NULL or == NULL. and a suggestion: how about putting a if (head == NULL)