<br><div class="gmail_quote"><div><div class="h5"><br><div class="gmail_quote"><div><div><div class="gmail_quote"><div><div><div class="gmail_quote"><div><div><div class="gmail_quote"><div><div><div class="gmail_quote">Hi.<br>
<br>It seems that at least ISC DHCP version 4.2.0-P2 has a memory leak when being configured in failover mode and the failover partner is down.<br>
The problem stays in omapip/connection.c when omapi_connect_list() calls for omapi_connection_register() (while TRACING ifdef compiled in) which allocates memory and never frees it.<br>
When failover TCP connection is broken, DHCP tries to reconnect it every 90 secs. But because omapi_connection_object_t is referenced in omapi_connections array, omapi_connection_destroy() is never called so every new connection attempt creates new omapi_connection_object_t while the old object remains. Futhermore every 10 iterations (10 reconnection attempts in our case) omapi_connections array is extended leaking more and more memory (see omapip/array.c omapi_array_set() routine) due to lack of support for object dereferencing in omapip/array.c. My installation on Solaris 10 exhausts 2 MB every 24h while failover connection being inactive.<br>
<br>The attached patch (which solves the problem - both leaks) against 4.2.0-P2 is proposed.<br><br><br>Best regards,<br>Serghei Samsi<br><br>
</div><br>
</div></div></div><br>
</div></div></div><br>
</div></div></div><br>
</div></div></div><br>
</div></div></div><br>