Forward patch of fix for bug #369

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2608 5f96b256-904b-4d8d-8c98-d829582c6739
dkhash: memory leak and possible loss of objects in dkhash_remove

Pointer to previous in dkhash_remove was only set for first element
in a given bucket. So when finding for example third object for
removal, setting prev->next=obj->next looses the reference to the
old prev->next, which is the second object in the list.

This can be tested by creating a hash map of one bucket (practically
a linked list), and fill and remove all, both forward and backward.
Such tests are also added with this patch.

Signed-off-by: Max Sikström <msikstrom@op5.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2612 5f96b256-904b-4d8d-8c98-d829582c6739
Add Max Sikström to THANKS-file

298 people on it now. Pretty damn impressive, tbh :)

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2613 5f96b256-904b-4d8d-8c98-d829582c6739
Add Dan Wittenberg and Mark Frost to THANKS

For invaluable testing, numerous bugreports and being generally
cool guys.

And now that we're 300, I just have to say;

This...

is!

SPAARTAA!!!!!!

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2614 5f96b256-904b-4d8d-8c98-d829582c6739
lib/dkhash: *really* fix memory leak and possible loss of objects

The previous fixes to dkhash_remove() were mangled beyond usefulness
from the original patch by yours truly. This additional patch fixes
it while retaining the nagios codestyle intact.

Mea culpa.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2615 5f96b256-904b-4d8d-8c98-d829582c6739