Subject: | Bluecat patch to fix problem in leasechain.c that was exposed by #41325 in 4.3.4 |
From Support ticket #10492, Fernando provides us with a fix to his own code (which I think was the performance related lease file stuff in #39078 which is switched on with --enable-binary-leases.)
I also think it was the cleanup work we did in #41325 that exposed it.
On Fri Sep 23 23:23:44 2016, fsoto@bluecatnetworks.com wrote:
> Hello,
>
> This one is kind of embarrassing.
> I'm reporting my own bug. :-))))
>
> When calling lc_delete_all() with a leasechain that is already empty,
> it will result in an attempt to call dfree on a null pointer and dhcpd
> will log:
>
> dhcpd: dfree leasechain.c(673): free on null pointer.
>
> The lc_delete_all calls were wrapped with an ifdef condition before
> 4.3.4, so we didn't detect that issue:
>
> #if defined (DEBUG_MEMORY_LEAKAGE) || \
> defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
> ...
> #endif
>
>
> Patch is attached ;-)
>
> Thanks,
> Fernando
I think this is just a logging problem - not a functional one?
Patch submitted is attached. It looks pretty sane and simple to me.
Subject: | leasechain_free_on_null.patch |
Message body not shown because it is not plain text.