Sorry if I wasn't clear about that, I calling CertFindCertificateInStore 
<https://msdn.microsoft.com/en-us/library/windows/desktop/aa376064(v=vs.85).aspx>
 which 
according to MSDN returns a pointer to a struct of type PCCERT_CONTEXT and 
must be freed with CertFreeCertificateContext 
<https://msdn.microsoft.com/en-us/library/windows/desktop/aa376075(v=vs.85).aspx>
.

The returned pointer is freed when passed as the *pPrevCertContext* 
> parameter on a subsequent call to the function. Otherwise, the pointer must 
> be explicitly freed by calling *CertFreeCertificateContext* 
> <https://msdn.microsoft.com/en-us/library/windows/desktop/aa376075(v=vs.85).aspx>.
>  
> A *pPrevCertContext* that is not *NULL* is always freed by 
> *CertFindCertificateInStore* using a call to *CertFreeCertificateContext*, 
> even if there is an error in the function.


So yes it is allocated by the crypt API of Windows, but i'm still not sure 
if can ignore the vet warning or not. As far as I understand, go only 
manages the pointer to the struct but not the struct itself.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to