diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-01 18:22:22 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-01 18:22:22 +0000 |
commit | cc3a7c5f72e6ff37ec8a8be4ae6ffd983c15e6b2 (patch) | |
tree | a358cb6bb1749d7de857b8a40b04cdc2f3da8b1e | |
parent | 127a655f49c0a422a78a259ed8c88e61e8c3de5f (diff) | |
download | tor-cc3a7c5f72e6ff37ec8a8be4ae6ffd983c15e6b2.tar.gz tor-cc3a7c5f72e6ff37ec8a8be4ae6ffd983c15e6b2.zip |
Backport 8499: remove dangerous free(0) on hashtable init
svn:r8564
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/common/ht.h | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -4,6 +4,11 @@ Changes in version 0.1.1.25 - 2006-10-?? [ongoing] and we have a cached answer, give them the cached answer. Previously, we would give them no answer at all. + o Minor bugfixes: + - Avoid a memory corruption bug when creating a hash table for the first + time. + + Changes in version 0.1.1.24 - 2006-09-29 o Major bugfixes: diff --git a/src/common/ht.h b/src/common/ht.h index dd90f2e4fd..63c873f3e6 100644 --- a/src/common/ht.h +++ b/src/common/ht.h @@ -379,7 +379,8 @@ ht_string_hash(const char *s) elm = next; \ } \ } \ - freefn(head->hth_table); \ + if (head->hth_table) \ + freefn(head->hth_table); \ head->hth_table = new_table; \ } else { \ unsigned b, b2; \ |