[FIX] Windows and Mac OS X compatibility.
This commit is contained in:
@@ -483,11 +483,7 @@ static int drng_chacha20_rng_selftest(struct chacha20_drng *drng)
|
||||
static void drng_chacha20_dealloc(struct chacha20_drng *drng)
|
||||
{
|
||||
memset_secure(drng, 0, sizeof(*drng));
|
||||
#ifdef _WIN32
|
||||
_aligned_free(drng);
|
||||
#else
|
||||
free(drng);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -595,7 +591,7 @@ int drng_chacha20_reseed(struct chacha20_drng *drng, const uint8_t *inbuf,
|
||||
DSO_PUBLIC
|
||||
void drng_chacha20_destroy(struct chacha20_drng *drng)
|
||||
{
|
||||
drng_chacha20_dealloc(drng);
|
||||
drng_chacha20_dealloc(drng);
|
||||
}
|
||||
|
||||
DSO_PUBLIC
|
||||
|
||||
Reference in New Issue
Block a user