In relay_digest_matches(), use stack instead of heap.

We'd been using crypto_digest_dup() and crypto_digest_assign() here,
but they aren't necessary.  Instead we can just use the stack to
store the previous state of the SHA_CTX and avoid a malloc/free pair.

Closes ticket 24914.
This commit is contained in:
Nick Mathewson
2018-01-24 12:33:13 -05:00
parent 7a74b3663f
commit 91c63aae84
5 changed files with 55 additions and 7 deletions
+3
View File
@@ -0,0 +1,3 @@
o Minor features (performance):
- Avoid a needless call to malloc() when processing an incoming
relay cell. Closes ticket 24914.