From 1010540edd20ed0f01eeeb7a981ad947f1582b82 Mon Sep 17 00:00:00 2001 From: El Mostafa IDRASSI Date: Thu, 7 Jul 2022 19:08:06 +0200 Subject: [PATCH] Fix certstore windows cmsg type error when building using go v1.18 Signed-off-by: El Mostafa IDRASSI --- certstore/certstore_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certstore/certstore_windows.go b/certstore/certstore_windows.go index 86c0b1c..2b38173 100644 --- a/certstore/certstore_windows.go +++ b/certstore/certstore_windows.go @@ -637,7 +637,7 @@ func (c errCode) Error() string { if cmsg == nil { return fmt.Sprintf("Error %X", int(c)) } - defer C.LocalFree(C.HLOCAL(cmsg)) + defer C.LocalFree(C.HLOCAL(unsafe.Pointer(cmsg))) gomsg := C.GoString(cmsg)