From eb1752e458961946fa49f01edd0e8cac82a5fc75 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 18 Dec 2008 00:17:46 +0000 Subject: [PATCH] Backport: Fix memory leak in rend_cache_store_v2_desc_as_client(). svn:r17666 --- ChangeLog | 3 +++ src/or/rendcommon.c | 1 + 2 files changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2bd4c7b725..beb02549e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -43,6 +43,9 @@ Changes in version 0.2.0.33 - 200?-??-?? - 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 diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index 9c5df44828..559d67e94d 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -1139,6 +1139,7 @@ rend_cache_store_v2_desc_as_client(const char *desc, 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? */ -- 2.47.3