myData should be set to NULL after free()