diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-23 17:21:18 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-23 17:21:18 +0200 |
commit | 15061d7e91d45bdfb42a9f39166dd30c5e47bcc4 (patch) | |
tree | c53121b1460b712b58fce67c105c53a355ad53ee /c | |
parent | fix year duplication (diff) | |
download | sha3sum-15061d7e91d45bdfb42a9f39166dd30c5e47bcc4.tar.gz sha3sum-15061d7e91d45bdfb42a9f39166dd30c5e47bcc4.tar.bz2 sha3sum-15061d7e91d45bdfb42a9f39166dd30c5e47bcc4.tar.xz |
fix memory leak
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'c')
-rw-r--r-- | c/sha3.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -697,7 +697,7 @@ extern byte* sha3_digest(byte* restrict_ msg, long msglen, boolean withReturn) #endif free(M); M = null; - rc = (byte*)malloc(((n + 7) >> 3) * sizeof(byte)); + rc = withReturn ? (byte*)malloc(((n + 7) >> 3) * sizeof(byte)) : null; _msg = message; nnn = len; |