Re: [Dnsmasq-discuss] [PATCH] Free config file values on parsing errors.

2018-11-02 Thread Simon Kelley
On 25/10/2018 09:36, Petr Mensik wrote:
> Hi again.
> 
> This time I have a little bit more controversal patches. But I think
> still useful. They fixes memory leaks that might occur in some cases.
> Most dnsmasq errors is fatal, so it does not matter. But some are not.
> Some parts are reloaded on SIGHUP signal, so it might leak more than once.
> 
> Some example when it changes the failures. Use dhcp-options file with
> this content:
> 
> tag:error,vendor:redhat
> option:ntp-server,1.2.3.4.5
> option6:ntp-server,[:::]
> 
> Is not fatal and dnsmasq will start. On each reload command, it would
> leak some memory. I validated it using valgrind --leak-check=full
> dnsmasq -d. This patch fixes it. It introduces something that might be
> considered constructor and destructor of selected structures. What do
> you think of it?
> 
> Comments are welcome. Another patch would be sent short after, they are
> too big together to require moderator attention.
> 

I've applied the patches. I think they're doing the right thing.

I'm a little bit concerned about how extensive the changes are, but I've
done my best to review everything, and I can't find any problems. We're
early in the 2.81 cycle, so if there is anything lurking, there's a
chance to find it.


Cheers,

Simon.


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Compile-time options - taming the combinatorial explosion.

2018-11-02 Thread Simon Kelley
Kevin's analysis is spot-on, as is his patch, which I've just applied.


Cheers,

Simon.


On 26/10/2018 00:24, Kevin Darbyshire-Bryant wrote:
> 
> 
>> On 25 Oct 2018, at 21:38, Kevin Darbyshire-Bryant 
>>  wrote:
>>
>> I think Openwrt is safe.   There will be a loud scream from me if it isn’t 
>> :-)
>>
>> Cheers,
>>
>> Kevin D-B
>>
> 
> In fact to prove it to myself I had a go at removing the NO_FORK compile time 
> option (patch attached) and had no obvious problem with the resultant binary 
> on Openwrt.
> 
> Whether Simon implements the change as I have done or takes the opportunity 
> to simplify things that I don’t understand I don’t know, but NO_FORK v 
> OPT_NO_FORK are different things and OPT_NO_FORK relies on NO_FORK *NOT* 
> being defined.
> 
> Cheers,
> 
> Kevin D-B
> 
> 012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A
> 
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss