Explorar o código

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.
Nick Mathewson %!s(int64=10) %!d(string=hai) anos
pai
achega
ab1a679eef
Modificáronse 2 ficheiros con 4 adicións e 0 borrados
  1. 3 0
      changes/bug11437
  2. 1 0
      src/or/dns.c

+ 3 - 0
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.

+ 1 - 0
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);
   }
 }