mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 06:35:28 +01:00
Backport candidate: remove dangerous free(0) on hashtable init
svn:r8499
This commit is contained in:
parent
78c068397a
commit
0f8491a254
2 changed files with 4 additions and 1 deletions
|
@ -53,6 +53,8 @@ Changes in version 0.1.2.2-alpha - 2006-??-??
|
||||||
- If we're a directory mirror and we ask for "all" network status
|
- If we're a directory mirror and we ask for "all" network status
|
||||||
documents, we would discard status documents from authorities
|
documents, we would discard status documents from authorities
|
||||||
we don't recognize.
|
we don't recognize.
|
||||||
|
- Avoid a memory corruption bug when creating a hash table for the first
|
||||||
|
time.
|
||||||
|
|
||||||
o Documentation
|
o Documentation
|
||||||
- Documented (and renamed) ServerDNSSearchDomains and
|
- Documented (and renamed) ServerDNSSearchDomains and
|
||||||
|
|
|
@ -307,7 +307,8 @@ ht_string_hash(const char *s)
|
||||||
elm = next; \
|
elm = next; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
freefn(head->hth_table); \
|
if (head->hth_table) \
|
||||||
|
freefn(head->hth_table); \
|
||||||
head->hth_table = new_table; \
|
head->hth_table = new_table; \
|
||||||
} else { \
|
} else { \
|
||||||
unsigned b, b2; \
|
unsigned b, b2; \
|
||||||
|
|
Loading…
Add table
Reference in a new issue