diff options
author | Roger Dingledine <arma@torproject.org> | 2007-05-27 04:38:50 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-05-27 04:38:50 +0000 |
commit | c1101fceebf4a0e48e7cdaabea3058627209e094 (patch) | |
tree | 93e788c79e74301fb4002d97fb6818f410331e63 /src/or | |
parent | e13bf01a9fe9f3fb57ea4f361bb7b309f2cb78ae (diff) | |
download | tor-c1101fceebf4a0e48e7cdaabea3058627209e094.tar.gz tor-c1101fceebf4a0e48e7cdaabea3058627209e094.zip |
we were leaking a few megabytes a minute checking signatures
svn:r10359
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/routerparse.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 1edbbaa329..0ec34240c8 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -818,14 +818,17 @@ check_signature_token(const char *digest, tok->object_size) != DIGEST_LEN) { log_warn(LD_DIR, "Error reading %s: invalid signature.", doctype); + tor_free(signed_digest); return -1; } log_debug(LD_DIR,"Signed %s hash starts %s", doctype, hex_str(signed_digest,4)); if (memcmp(digest, signed_digest, DIGEST_LEN)) { log_warn(LD_DIR, "Error reading %s: signature does not match.", doctype); + tor_free(signed_digest); return -1; } + tor_free(signed_digest); return 0; } |