diff options
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; } |