diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-21 08:36:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-21 08:36:48 -0400 |
commit | c389c4129252b49f7e5bd77e1be342cddbe388fb (patch) | |
tree | ba25ea323d89342a8fcf81970c4cbb24b9ce4f42 /src/or/protover.c | |
parent | 46dca273214147233808bcddb82c8bf76e8d6db5 (diff) | |
parent | 7b1a3c51644891c4548ccdfd4e8d444cd91b91b0 (diff) | |
download | tor-c389c4129252b49f7e5bd77e1be342cddbe388fb.tar.gz tor-c389c4129252b49f7e5bd77e1be342cddbe388fb.zip |
Merge branch 'maint-0.3.3' into maint-0.3.4
Diffstat (limited to 'src/or/protover.c')
-rw-r--r-- | src/or/protover.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/or/protover.c b/src/or/protover.c index e4efe0a70b..0e8902196d 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 */ } /** |