summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP/src/cpp_rsam.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CryptoPP/src/cpp_rsam.cpp')
-rw-r--r--plugins/CryptoPP/src/cpp_rsam.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/CryptoPP/src/cpp_rsam.cpp b/plugins/CryptoPP/src/cpp_rsam.cpp
index a45cf4d9da..36dacf7e0b 100644
--- a/plugins/CryptoPP/src/cpp_rsam.cpp
+++ b/plugins/CryptoPP/src/cpp_rsam.cpp
@@ -863,18 +863,19 @@ void rsa_alloc( pCNTX ptr ) {
void rsa_free( pCNTX ptr ) {
pRSADATA p = (pRSADATA) ptr->pdata;
- if (p && p->event) {
+ if (p == NULL)
+ return;
+
+ if (p->event) {
p->thread_exit = 2; // отпускаем поток в свободное плавание
SetEvent( p->event );
}
- else {
- delete p->queue;
- delete p;
- ptr->pdata = NULL;
- }
+
+ delete p->queue;
+ delete p;
+ ptr->pdata = NULL;
}
-
void rsa_free_thread( pRSADATA p ) {
if ( p->event ) {
p->thread_exit = 1;