[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r17666: {tor} Backport: Fix memory leak in rend_cache_store_v2_desc_as_cli (in tor/branches/tor-0_2_0-patches: . src/or)
Author: nickm
Date: 2008-12-17 19:17:46 -0500 (Wed, 17 Dec 2008)
New Revision: 17666
Modified:
tor/branches/tor-0_2_0-patches/ChangeLog
tor/branches/tor-0_2_0-patches/src/or/rendcommon.c
Log:
Backport: Fix memory leak in rend_cache_store_v2_desc_as_client().
Modified: tor/branches/tor-0_2_0-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_2_0-patches/ChangeLog 2008-12-18 00:11:49 UTC (rev 17665)
+++ tor/branches/tor-0_2_0-patches/ChangeLog 2008-12-18 00:17:46 UTC (rev 17666)
@@ -43,6 +43,9 @@
- Clip the CircuitBuildTimeout to a minimum of 30 seconds. Warn the
user if lower values are given in the configuration. Bugfix on
0.1.1.17-rc. Patch by Sebastian.
+ - Fix a memory leak when we decline to add a v2 rendezvous descriptor to
+ the cache because we already had a v0 descriptor with the same ID.
+ Bugfix on 0.2.0.18-alpha.
o Minor features:
- Report the case where all signatures in a detached set are rejected
Modified: tor/branches/tor-0_2_0-patches/src/or/rendcommon.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/or/rendcommon.c 2008-12-18 00:11:49 UTC (rev 17665)
+++ tor/branches/tor-0_2_0-patches/src/or/rendcommon.c 2008-12-18 00:17:46 UTC (rev 17666)
@@ -1139,6 +1139,7 @@
if (strmap_get_lc(rend_cache, key)) {
log_info(LD_REND, "We already have a v0 descriptor for service ID %s.",
safe_str(service_id));
+ rend_service_descriptor_free(parsed);
return -1;
}
/* Do we already have a newer descriptor? */