summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/CryptoPP/src/cpp_rsam.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/CryptoPP/src/cpp_rsam.cpp b/plugins/CryptoPP/src/cpp_rsam.cpp
index 0fd1e9de7f..a45cf4d9da 100644
--- a/plugins/CryptoPP/src/cpp_rsam.cpp
+++ b/plugins/CryptoPP/src/cpp_rsam.cpp
@@ -863,10 +863,15 @@ void rsa_alloc( pCNTX ptr ) {
void rsa_free( pCNTX ptr ) {
pRSADATA p = (pRSADATA) ptr->pdata;
- if ( p && p->event ) {
+ if (p && p->event) {
p->thread_exit = 2; // отпускаем поток в свободное плавание
SetEvent( p->event );
}
+ else {
+ delete p->queue;
+ delete p;
+ ptr->pdata = NULL;
+ }
}