re_free (dfa);
re_compile_internal_free_return: free_workarea_compile (preg); re_string_destruct (&regexp); free_dfa_content (dfa);
re_compile_internal (preg, pattern, length, syntax)     regex_t *preg;     const char * pattern;     int length;     reg_syntax_t syntax;{  reg_errcode_t err = REG_NOERROR;  re_dfa_t *dfa;  re_string_t regexp;  /* Initialize the pattern buffer.  */  preg->fastmap_accurate = 0;  preg->syntax = syntax;  preg->not_bol = preg->not_eol = 0;  preg->used = 0;  preg->re_nsub = 0;  preg->can_be_null = 0;  preg->regs_allocated = REGS_UNALLOCATED;  /* Initialize the dfa.  */  dfa = (re_dfa_t *) preg->buffer;  if (preg->allocated < sizeof (re_dfa_t))    {      /* If zero allocated, but buffer is non-null, try to realloc	 enough space.  This loses if buffer's address is bogus, but	 that is the user's responsibility.  If ->buffer is NULL this	 is a simple allocation.  */      dfa = re_realloc (preg->buffer, re_dfa_t, 1);      if (dfa == NULL)	return REG_ESPACE;      preg->allocated = sizeof (re_dfa_t);    }  preg->buffer = (unsigned char *) dfa;  preg->used = sizeof (re_dfa_t);  err = init_dfa (dfa, length);  if (BE (err != REG_NOERROR, 0))    {      re_free (dfa);      preg->buffer = NULL;      preg->allocated = 0;      return err;    }#ifdef DEBUG  dfa->re_str = re_malloc (char, length + 1);  strncpy (dfa->re_str, pattern, length + 1);#endif  err = re_string_construct (&regexp, pattern, length, preg->translate,			     syntax & RE_ICASE, dfa);  if (BE (err != REG_NOERROR, 0))    {      re_free (dfa);      preg->buffer = NULL;      preg->allocated = 0;      return err;    }  /* Parse the regular expression, and build a structure tree.  */  preg->re_nsub = 0;  dfa->str_tree = parse (&regexp, preg, syntax, &err);  if (BE (dfa->str_tree == NULL, 0))    goto re_compile_internal_free_return;#ifdef RE_ENABLE_I18N  /* If possible, do searching in single byte encoding to speed things up.  */  if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL)    optimize_utf8 (dfa);#endif  /* Analyze the tree and collect information which is necessary to     create the dfa.  */  err = analyze (dfa);  if (BE (err != REG_NOERROR, 0))    goto re_compile_internal_free_return;  /* Then create the initial state of the dfa.  */  err = create_initial_state (dfa);  /* Release work areas.  */  free_workarea_compile (preg);  re_string_destruct (&regexp);  if (BE (err != REG_NOERROR, 0))    {    re_compile_internal_free_return:      free_dfa_content (dfa);      preg->buffer = NULL;      preg->allocated = 0;    }  return err;}