Fix a small memory leak when resolving PTR addresses

Fixes bug 11437; bugfix on 0.2.4.7-alpha.

Found by coverity; this is CID 1198198.
This commit is contained in:
Nick Mathewson 2014-04-07 23:29:47 -04:00
parent 48578e1512
commit ab1a679eef
2 changed files with 4 additions and 0 deletions

3
changes/bug11437 Normal file
View File

@ -0,0 +1,3 @@
o Minor bugfixes:
- Stop leaking memory when we successfully resolve a PTR record.
Fixes bug 11437; bugfix on 0.2.4.7-alpha.

View File

@ -1352,6 +1352,7 @@ inform_pending_connections(cached_resolve_t *resolve)
} }
resolve->pending_connections = pend->next; resolve->pending_connections = pend->next;
tor_free(pend); tor_free(pend);
tor_free(hostname);
} }
} }