beecrypt: fix memory leak in test
Closes Homebrew/homebrew#39393. Signed-off-by: Tim D. Smith <git@tim-smith.us>
This commit is contained in:
parent
452bfa8861
commit
9c51719c22
1 changed files with 4 additions and 1 deletions
|
@ -41,13 +41,16 @@ class Beecrypt < Formula
|
|||
sha256Param hash;
|
||||
const byte *string = (byte *) "abc";
|
||||
byte digest[32];
|
||||
byte *crc;
|
||||
|
||||
sha256Reset(&hash);
|
||||
sha256Update(&hash, string, sizeof(string) / sizeof(*string));
|
||||
sha256Process(&hash);
|
||||
sha256Digest(&hash, digest);
|
||||
|
||||
printf("%s\\n", b64crc(digest, 32));
|
||||
printf("%s\\n", crc = b64crc(digest, 32));
|
||||
|
||||
free(crc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue