A string allocated with C.CString is allocated using the C malloc
function. It sounds like you are passing that string to C, in which
case it becomes the responsibility of the C code to free the string.
C code has to be aware of memory use and has to free memory when it is
no longer needed. If your C code does not track memory properly, that
is unfortunate, but there is nothing you can do to fix it safely on
the Go side.
Ian