aboutsummaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-01-16 05:27:19 +0000
committerNick Mathewson <nickm@torproject.org>2008-01-16 05:27:19 +0000
commit4a3b7496f0c47b0d00c9744698eaa237e601b32a (patch)
treefdefeb3c864306cc52f3e9f5dadb8414f8a99187 /src/or/control.c
parent24aae484c93b09c7fc735e53874f02a22e4b5b43 (diff)
downloadtor-4a3b7496f0c47b0d00c9744698eaa237e601b32a.tar.gz
tor-4a3b7496f0c47b0d00c9744698eaa237e601b32a.zip
r17639@catbus: nickm | 2008-01-15 19:09:21 -0500
Fix some hard to trigger but nonetheless real memory leaks spotted by an anonymous contributor. Needs review. Partial backport candidate. svn:r13147
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c
index d6424d8581..14ad57a1d8 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -704,6 +704,7 @@ control_setconf_helper(control_connection_t *conn, uint32_t len, char *body,
connection_write_str_to_buf("551 Couldn't parse string\r\n", conn);
SMARTLIST_FOREACH(entries, char *, cp, tor_free(cp));
smartlist_free(entries);
+ tor_free(key);
return 0;
}
}
@@ -1440,6 +1441,7 @@ getinfo_helper_dir(control_connection_t *control_conn,
res = dirserv_get_routerdescs(descs, url, &msg);
if (res) {
log_warn(LD_CONTROL, "getinfo '%s': %s", question, msg);
+ smartlist_free(descs);
return -1;
}
SMARTLIST_FOREACH(descs, signed_descriptor_t *, sd,