set cs to NULL after free