The following commit has been merged in the master branch: commit 2977a6550869e47f0156a47ce955b8182670fdf2 Author: Simon Wunderlich siwu@hrz.tu-chemnitz.de Date: Wed Mar 28 12:16:23 2007 +0200
- fix double free easter egg!! :D
diff --git a/hash.c b/hash.c index ba408f0..8de9e1f 100644 --- a/hash.c +++ b/hash.c @@ -19,7 +19,8 @@
#include <stdio.h> /* NULL */ -#include "batman-specific.h" +#include "hash.h" +#include "allocate.h"
/* clears the hash */ @@ -231,6 +232,9 @@ void *hash_remove_bucket(struct hashtable_t *hash, struct element_t *bucket) { bucket->next= bucket->next->next; debugFree(next_bucket, 1306); /* free the next_bucket, as we copied its data into our * first bucket. */ + if (bucket->next!=NULL) { /* 3rd bucket would point on the removed bucket. fix this. */ + bucket->next->prev= bucket; + } } } else { /* not the first entry */ if (bucket->next!=NULL)