]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a harmless-to-us bug in ht.h.
authorNick Mathewson <nickm@torproject.org>
Sat, 10 Jan 2009 14:40:43 +0000 (14:40 +0000)
committerNick Mathewson <nickm@torproject.org>
Sat, 10 Jan 2009 14:40:43 +0000 (14:40 +0000)
There was a field that _HT_FOI_INSERT was never setting. Everything that calls _HT_FOI_INSERT was setting it via tor_malloc_zero, but that's fragile.

svn:r18064

src/common/ht.h

index 53c06d890e87960a7ca1d70bec819d77c769c695..54b030b04738374a861773d08cb5af25b6b4bdc2 100644 (file)
@@ -418,6 +418,7 @@ ht_string_hash(const char *s)
 #define _HT_FOI_INSERT(field, head, elm, newent, var)       \
   {                                                         \
     newent->field.hte_hash = (elm)->field.hte_hash;         \
+    newent->field.hte_next = NULL;                          \
     *var = newent;                                          \
     ++((head)->hth_n_entries);                              \
   }