[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/maint-0.2.4] Fix a small memory leak when resolving PTR addresses



commit ab1a679eef77520f072e9933ae125dfcf0c228cf
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Apr 7 23:29:47 2014 -0400

    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.
---
 changes/bug11437 |    3 +++
 src/or/dns.c     |    1 +
 2 files changed, 4 insertions(+)

diff --git a/changes/bug11437 b/changes/bug11437
new file mode 100644
index 0000000..f5117ca
--- /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 f2b7eec..fb1b10d 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);
   }
 }
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits