summaryrefslogtreecommitdiff
path: root/dll.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dll.cpp')
-rw-r--r--dll.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/dll.cpp b/dll.cpp
index a51a897..9efaec7 100644
--- a/dll.cpp
+++ b/dll.cpp
@@ -56,18 +56,9 @@ static PDelete s_pDelete = NULL;
static void * CRYPTOPP_CDECL New (size_t size)
{
- new_handler newHandler = set_new_handler(NULL);
- if (newHandler)
- set_new_handler(newHandler);
-
void *p;
while (!(p = malloc(size)))
- {
- if (newHandler)
- newHandler();
- else
- throw std::bad_alloc();
- }
+ CallNewHandler();
return p;
}