aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-08-22 03:21:51 +0000
committerRoger Dingledine <arma@torproject.org>2007-08-22 03:21:51 +0000
commit353abd98306f448adf474a44850838f0238505e2 (patch)
treed7e220349722052bd0918eeeda28f9a4523cc66d /src/or/routerparse.c
parent79066b48511ee48cc10edfcbd5d0a8ed29e6de23 (diff)
downloadtor-353abd98306f448adf474a44850838f0238505e2.tar.gz
tor-353abd98306f448adf474a44850838f0238505e2.zip
backport candidate:
Stop leaking part of the descriptor when we run into a particularly unparseable piece of it. Bugfix on 0.1.2.x. svn:r11249
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index ccf3e38ddb..29d9fddf2b 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2650,6 +2650,7 @@ tokenize_string(const char *start, const char *end, smartlist_t *out,
tok = get_next_token(s, end, table);
if (tok->tp == _ERR) {
log_warn(LD_DIR, "parse error: %s", tok->error);
+ token_free(tok);
return -1;
}
++counts[tok->tp];