diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2014-05-05 18:04:57 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2014-05-05 18:04:57 +0000 |
commit | e234ddef95e28f0bd07bc7d35cc78704d3074382 (patch) | |
tree | ea450904484bcb73894302f745b6da0358edd2e9 /lib/libc/regex | |
parent | 5a1a4f754a3e0e16fea821b460d8eb2d1dfe6ea6 (diff) | |
download | src-e234ddef95e28f0bd07bc7d35cc78704d3074382.tar.gz src-e234ddef95e28f0bd07bc7d35cc78704d3074382.zip |
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
Notes
Notes:
svn path=/head/; revision=265375
Diffstat (limited to 'lib/libc/regex')
-rw-r--r-- | lib/libc/regex/regcomp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 026d7726d389..55f9c04c6910 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -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); |