diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-07-01 11:52:39 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-07-01 12:54:19 -0400 |
commit | 46297bc7bd86826fa79195f36059ce408ef45b6c (patch) | |
tree | 3d8f06b40018be5e9c825254d8cedb751361bacb | |
parent | 010b8dd4f6e8e3c3d2e44ff589ff61cbf64b952a (diff) | |
download | tor-46297bc7bd86826fa79195f36059ce408ef45b6c.tar.gz tor-46297bc7bd86826fa79195f36059ce408ef45b6c.zip |
Fix a rare memory leak in rend_cache_store
When we rejected a descriptor for not being the one we wanted, we
were letting the parsed descriptor go out of scope.
Found by Coverity; CID # 30.
Bugfix on 0.2.1.26.
(No changes file yet, since this is not in any 0.2.1.x release.)
-rw-r--r-- | src/or/rendcommon.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index 8727a70c2e..e0c101e1ee 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -1077,6 +1077,7 @@ rend_cache_store(const char *desc, size_t desc_len, int published, log_warn(LD_REND, "Received service descriptor for service ID %s; " "expected descriptor for service ID %s.", query, safe_str(service_id)); + rend_service_descriptor_free(parsed); return -2; } now = time(NULL); |