From: Nick Mathewson Date: Tue, 8 Apr 2014 03:29:47 +0000 (-0400) Subject: Fix a small memory leak when resolving PTR addresses X-Git-Tag: tor-0.2.5.4-alpha~61^2^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab1a679eef77520f072e9933ae125dfcf0c228cf;p=thirdparty%2Ftor.git 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. --- diff --git a/changes/bug11437 b/changes/bug11437 new file mode 100644 index 0000000000..f5117cae99 --- /dev/null +++ b/changes/bug11437 @@ -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. diff --git a/src/or/dns.c b/src/or/dns.c index f2b7eecc3f..fb1b10d82c 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -1352,6 +1352,7 @@ inform_pending_connections(cached_resolve_t *resolve) } resolve->pending_connections = pend->next; tor_free(pend); + tor_free(hostname); } }