summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-01-10 14:40:43 +0000
committerNick Mathewson <nickm@torproject.org>2009-01-10 14:40:43 +0000
commit0fe5ce423a38520b2a7a214bad8bb4fbfd3073cb (patch)
treebd3bddce2bd54948e3291236858e9af0ac801ba6
parentdbc8a44baee759e301517249c37e47359a5381b3 (diff)
downloadtor-0fe5ce423a38520b2a7a214bad8bb4fbfd3073cb.tar.gz
tor-0fe5ce423a38520b2a7a214bad8bb4fbfd3073cb.zip
Fix a harmless-to-us bug in ht.h.
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
-rw-r--r--src/common/ht.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/ht.h b/src/common/ht.h
index 53c06d890e..54b030b047 100644
--- a/src/common/ht.h
+++ b/src/common/ht.h
@@ -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); \
}