Use iOS securePtrOverwriteAndFree implementation for all Apple platforms

This commit is contained in:
2026-02-07 23:30:53 -05:00
parent 904c084711
commit 218fa55581
2 changed files with 2 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
//go:build ios || darwin
package main
// #include <string.h>
// #include <stdlib.h>
import "C"
import "unsafe"
// securePtrOverwriteAndFree securely overwrites the memory at the input pointer and then frees it.
func securePtrOverwriteAndFree(input unsafe.Pointer, length C.size_t) {
C.memset_s(input, length, 0, length)
C.free(input)
}