> { > // Storage for temporary string > char* s = NULL; > > scm_dynwind_begin (0); > s = scm_to_locale_string (scm_val); > > fstWriterEmitValueChange(SCM_TO_CTX (scm_ctx), > SCM_TO_FSTHANDLE (scm_fsthandle), > s); > scm_dynwind_free (s); > scm_dynwind_end(); > > return SCM_UNSPECIFIED; > }
You are supposed to call scm_dynwind_free(s) before anything that can throw, ie right after the call to scm_to_locale_string(), IMHO.