scan_scanf not always allocating a new string; cleanup test