summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-10-26 22:12:40 -0400
committerNick Mathewson <nickm@torproject.org>2009-10-26 22:12:40 -0400
commit5c73da7faad1537f63c0f9923a25f3dda9df0de1 (patch)
treed0af44057e396e18f3f43b1a74a2667a798dd9bf /src/or/control.c
parent8bada1ef67cd7e84f3f22f7e4ef8eb99a8252776 (diff)
downloadtor-5c73da7faad1537f63c0f9923a25f3dda9df0de1.tar.gz
tor-5c73da7faad1537f63c0f9923a25f3dda9df0de1.zip
Fix two memory leaks found by Coverity (CIDs 417-418)
The first happens on an error case when a controller wants an impossible directory object. The second happens when we can't write our fingerprint file.
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c
index 5688b8e71f..f0178d74a9 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1536,6 +1536,7 @@ getinfo_helper_dir(control_connection_t *control_conn,
if (res) {
log_warn(LD_CONTROL, "getinfo '%s': %s", question, msg);
smartlist_free(descs);
+ tor_free(url);
return -1;
}
SMARTLIST_FOREACH(descs, signed_descriptor_t *, sd,