revert previous, and better fix for memory corruption (STR_FREE available since 5.0)