
Make sure to call C.free on C strings allocated using C.CString. C.CString allocates memory in the C heap using malloc. It is the callers responsibility to free them. See https://golang.org/cmd/cgo/#hdr-Go_references_to_C for details. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>