From ca34edb230ca87aae5fa4d585273c0d88fa2694d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 18 Mar 2013 13:08:54 +0000 Subject: more correct memory cleanup on exit git-svn-id: http://svn.miranda-ng.org/main/trunk@4091 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CryptoPP/src/cpp_rsam.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; + } } -- cgit v1.2.3