mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-20 10:12:15 +01:00
r15001@catbus: nickm | 2007-09-10 09:44:49 -0400
Fix a couple of memory leaks in eventdns.c; found by niels. Not backport candidates, since they only affect DNSPort users. svn:r11413
This commit is contained in:
parent
6744ebe7b5
commit
615d19fe4c
@ -27,6 +27,8 @@ Changes in version 0.2.0.7-alpha - 2007-??-??
|
||||
"experimental", since it seems to have worked fine for ages.
|
||||
- Fix a user-triggerable segfault in expand_filename(). (There isn't
|
||||
a way to trigger this remotely.)
|
||||
- Fix a memory leak when freeing incomplete requests from DNSPort.
|
||||
(Found by Niels Provos with valgrind.)
|
||||
|
||||
o Code simplifications and refactoring:
|
||||
- Revamp file-writing logic so we don't need to have the entire contents
|
||||
|
@ -1745,7 +1745,7 @@ server_request_free_answers(struct server_request *req)
|
||||
free(victim->name);
|
||||
if (victim->data)
|
||||
free(victim->data);
|
||||
/* XXXX free(victim?) -NM */
|
||||
free(victim);
|
||||
victim = next;
|
||||
}
|
||||
*list = NULL;
|
||||
@ -1761,6 +1761,7 @@ server_request_free(struct server_request *req)
|
||||
if (req->base.questions) {
|
||||
for (i = 0; i < req->base.nquestions; ++i)
|
||||
free(req->base.questions[i]);
|
||||
free(req->base.questions);
|
||||
}
|
||||
|
||||
if (req->port) {
|
||||
|
Loading…
Reference in New Issue
Block a user