summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-18 13:08:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-18 13:08:54 +0000
commitca34edb230ca87aae5fa4d585273c0d88fa2694d (patch)
tree79889b02d40804073b24f844d5de4d5b820b8de2 /plugins/CryptoPP/src
parent976508f30d0579e05d8ccd53be903b3cda89f508 (diff)
more correct memory cleanup on exit
git-svn-id: http://svn.miranda-ng.org/main/trunk@4091 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CryptoPP/src')
-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;
+ }
}