summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2014-05-05 18:04:57 +0000
committerpfg <pfg@FreeBSD.org>2014-05-05 18:04:57 +0000
commit8cec0590bb371525e58de74912d1bfd37aa05881 (patch)
treeea450904484bcb73894302f745b6da0358edd2e9 /lib
parenta83f2bfbbd6c98c7b7caac7e8efa18e49be0b241 (diff)
downloadFreeBSD-src-8cec0590bb371525e58de74912d1bfd37aa05881.zip
FreeBSD-src-8cec0590bb371525e58de74912d1bfd37aa05881.tar.gz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/regex/regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c
index 026d772..55f9c04 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);
OpenPOWER on IntegriCloud