this should have been put_malloced_string(str)