Revert r265367:

Use of calloc instead of malloc in regex (from OpenBSD).

In this case the change makes no sense since we are using realloc() later.

Reported by:	ache
This commit is contained in:
Pedro F. Giffuni 2014-05-05 18:04:57 +00:00
parent 5a1a4f754a
commit e234ddef95
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265375

View File

@ -214,7 +214,7 @@ regcomp(regex_t * __restrict preg,
if (g == NULL)
return(REG_ESPACE);
p->ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */
p->strip = (sop *)calloc(p->ssize, sizeof(sop));
p->strip = (sop *)malloc(p->ssize * sizeof(sop));
p->slen = 0;
if (p->strip == NULL) {
free((char *)g);