[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r10359: we were leaking a few megabytes a minute checking signatures (tor/trunk/src/or)
Author: arma
Date: 2007-05-27 00:38:50 -0400 (Sun, 27 May 2007)
New Revision: 10359
Modified:
tor/trunk/src/or/routerparse.c
Log:
we were leaking a few megabytes a minute checking signatures
Modified: tor/trunk/src/or/routerparse.c
===================================================================
--- tor/trunk/src/or/routerparse.c 2007-05-27 03:41:09 UTC (rev 10358)
+++ tor/trunk/src/or/routerparse.c 2007-05-27 04:38:50 UTC (rev 10359)
@@ -818,14 +818,17 @@
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;
}