Free input privKeyPascal

This commit is contained in:
2026-02-08 00:39:40 -05:00
parent 1564de51d0
commit 73339e3eb6
+4 -3
View File
@@ -9,9 +9,10 @@ import (
"github.com/rwinkhart/libmutton/privkey" "github.com/rwinkhart/libmutton/privkey"
) )
// SetPrivKeyBytes forces libmutton to use custom bytes for the SSH private key. // SetPrivKeyBytesAndFree forces libmutton to use custom bytes for the SSH private key.
// //
//export SetPrivKeyBytes //export SetPrivKeyBytesAndFree
func SetPrivKeyBytes(privKeyPascal C.PascalString) { func SetPrivKeyBytesAndFree(privKeyPascal C.PascalString) {
privkey.SetBytes(C.GoBytes(unsafe.Pointer(privKeyPascal.data), privKeyPascal.len)) privkey.SetBytes(C.GoBytes(unsafe.Pointer(privKeyPascal.data), privKeyPascal.len))
FreePascalString(privKeyPascal)
} }