ReleaseHandle is called only when IsInvalid is false.
Refer: https://msdn.microsoft.com/en-us/library/system.runtime.interopservices.safehandle.releasehandle(v=vs.110).aspx
Change-Id: Icff0eff4e5f9e8ef88b1518a7187d05ca0962426
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
/// <returns>true if the handle is released successfully.</returns>
protected override bool ReleaseHandle()
{
- if (IsInvalid) // do not release
- return true;
Interop.CkmcTypes.CertFree(handle);
this.SetHandle(IntPtr.Zero);
return true;
/// <returns>true if the handle is released successfully</returns>
protected override bool ReleaseHandle()
{
- if (IsInvalid) // do not release
- return true;
-
Interop.CkmcTypes.KeyFree(handle);
this.SetHandle(IntPtr.Zero);
return true;
/// <returns>true if the handle is released successfully</returns>
protected override bool ReleaseHandle()
{
- if (IsInvalid) // do not release
- return true;
-
Interop.CkmcTypes.Pkcs12Free(handle);
this.SetHandle(IntPtr.Zero);
return true;
/// <returns>true if the handle is released successfully</returns>
protected override bool ReleaseHandle()
{
- if (IsInvalid) // do not release
- return true;
-
Interop.CkmcTypes.AliasListAllFree(handle);
this.SetHandle(IntPtr.Zero);
return true;
/// <returns>true if the handle is released successfully</returns>
protected override bool ReleaseHandle()
{
- if (handle == IntPtr.Zero) // do not release
- return true;
-
Interop.CkmcTypes.CertListAllFree(handle);
this.SetHandle(IntPtr.Zero);
return true;
/// <returns>true if the handle is released successfully</returns>
protected override bool ReleaseHandle()
{
- if (IsInvalid) // do not release
- return true;
-
Interop.CkmcTypes.BufferFree(handle);
this.SetHandle(IntPtr.Zero);
return true;