From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
Usually, if you get the message invalid: freed it is because you have already freed the pointer before... Just check it out.
Have you verify if CA_VariantGet1DArray didn't return an error or did not allocate correctly the array?
And finally here it is an extract from the CVI Help about which function you need to use according to the type of array values :
C-style array that CA_VariantGet1DArray dynamically allocates. The type of the array must be the same as arrayType. Pass the address of an array pointer.
You can treat this array like any other 1D C array.
Call CA_FreeMemory on the array to discard it when it is no longer needed. If the array contains any of the data types in the following table, you must call the appropriate function to free each element when you finish using it.