diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-09-25 16:06:09 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-09-25 16:06:09 +0000 |
commit | 0f8491a254f799b7d850e533827a19ac43eac5e2 (patch) | |
tree | 7320f06661df9a9fcd96574ef341e2da207d21d6 /src/common/ht.h | |
parent | 78c068397a663d450048bfe41ce4a2536732fbdb (diff) | |
download | tor-0f8491a254f799b7d850e533827a19ac43eac5e2.tar.gz tor-0f8491a254f799b7d850e533827a19ac43eac5e2.zip |
Backport candidate: remove dangerous free(0) on hashtable init
svn:r8499
Diffstat (limited to 'src/common/ht.h')
-rw-r--r-- | src/common/ht.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/ht.h b/src/common/ht.h index a83e093264..d51d7c5c00 100644 --- a/src/common/ht.h +++ b/src/common/ht.h @@ -307,7 +307,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; \ |