aboutsummaryrefslogtreecommitdiff
path: root/src/or/protover.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-21 08:36:48 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-21 08:36:48 -0400
commit683776bfab21ec48d967d8589412f81c6b39afe6 (patch)
tree3aa08de699c310d7592cb61b38f70653ebaf4538 /src/or/protover.c
parent599b53f0469e477275d56715ded46b749f5dd06b (diff)
parentc389c4129252b49f7e5bd77e1be342cddbe388fb (diff)
downloadtor-683776bfab21ec48d967d8589412f81c6b39afe6.tar.gz
tor-683776bfab21ec48d967d8589412f81c6b39afe6.zip
Merge branch 'maint-0.3.4'
Diffstat (limited to 'src/or/protover.c')
-rw-r--r--src/or/protover.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/or/protover.c b/src/or/protover.c
index 3a106a50e8..f63c134565 100644
--- a/src/or/protover.c
+++ b/src/or/protover.c
@@ -283,9 +283,12 @@ parse_protocol_list(const char *s)
bool
protover_contains_long_protocol_names(const char *s)
{
- if (!parse_protocol_list(s))
- return true;
- return false;
+ smartlist_t *list = parse_protocol_list(s);
+ if (!list)
+ return true; /* yes, has a dangerous name */
+ SMARTLIST_FOREACH(list, proto_entry_t *, ent, proto_entry_free(ent));
+ smartlist_free(list);
+ return false; /* no, looks fine */
}
/**