- len = SCM_LENGTH (sym);
-
- ret_str = (char *) scm_must_malloc ((len + 1) * sizeof (char),
- "gh_symbol2newstr");
- /* so we copy tmp_str to ret_str, which is what we will allocate */
- memcpy (ret_str, SCM_CHARS (sym), len);
+ ret_str = (char *) malloc ((len + 1) * sizeof (char));
+ if (ret_str == NULL)
+ return NULL;
+ /* so we copy sym to ret_str, which is what we will allocate */
+ memcpy (ret_str, SCM_SYMBOL_CHARS (sym), len);
+ scm_remember_upto_here_1 (sym);