mirror of
https://github.com/monero-project/monero.git
synced 2026-07-30 23:50:24 -07:00
Merge pull request #3187
851bd057 call _exit instead of abort in release mode (moneromooo-monero)
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#define __STDC_WANT_LIB_EXT1__ 1
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_EXPLICIT_BZERO
|
||||
#include <strings.h>
|
||||
#endif
|
||||
@@ -50,7 +51,12 @@ void *memwipe(void *ptr, size_t n)
|
||||
{
|
||||
if (memset_s(ptr, n, 0, n))
|
||||
{
|
||||
#ifdef NDEBUG
|
||||
fprintf(stderr, "Error: memset_s failed\n");
|
||||
_exit(1);
|
||||
#else
|
||||
abort();
|
||||
#endif
|
||||
}
|
||||
SCARECROW // might as well...
|
||||
return ptr;
|
||||
|
||||
Reference in New Issue
Block a user