pike.git / src / modules / Regexp / pike_regexp.c

version» Context lines:

pike.git/src/modules/Regexp/pike_regexp.c:303:    if (reg(0, &flags) == NULL)    goto exit_regcomp;       /* Small enough for pointer-storage convention? */    if (regsize >= 32767L) /* Probably could be 65535L. */    {    FAIL("regexp too big");    }       /* Allocate space. */ -  r = malloc(sizeof(regexp) + (unsigned) regsize); -  if(!r) -  { -  Pike_error(msg_out_of_mem); -  } +  r = xalloc(sizeof(regexp) + (unsigned) regsize);       /* Second pass: emit code. */    regparse = exp2;    regnpar = 1;    regcode = r->program;    if (reg(0, &flags) == NULL)    {    free(r);    r = NULL;    goto exit_regcomp;