mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-11-01 19:17:59 +00:00
fixed a crash on WinCE; code cleanup
This commit is contained in:
@@ -73,7 +73,7 @@ public:
|
||||
const_cast<AutoSecBufferDesc*>(&desc)->initBuffers();
|
||||
}
|
||||
|
||||
AutoSecBufferDesc& operator=(const AutoSecBufferDesc& desc)
|
||||
AutoSecBufferDesc& operator = (const AutoSecBufferDesc& desc)
|
||||
{
|
||||
if (&desc != this)
|
||||
{
|
||||
@@ -96,13 +96,22 @@ public:
|
||||
|
||||
~AutoSecBufferDesc()
|
||||
/// Destroys the AutoSecBufferDesc
|
||||
{
|
||||
release();
|
||||
}
|
||||
|
||||
void release()
|
||||
{
|
||||
if (_autoRelease)
|
||||
{
|
||||
for (int i = 0; i < numBufs; ++i)
|
||||
{
|
||||
_pSec->FreeContextBuffer(_buffers[i].pvBuffer);
|
||||
if (_buffers[i].pvBuffer)
|
||||
{
|
||||
_pSec->FreeContextBuffer(_buffers[i].pvBuffer);
|
||||
}
|
||||
}
|
||||
_autoRelease = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user