Unverified Commit 12c6e1fa by Patrick Steinhardt Committed by GitHub

Merge pull request #4986 from lhchavez/realloc

Make stdalloc__reallocarray call stdalloc__realloc
parents 9f388e9f 6e0dfc6f
......@@ -88,11 +88,10 @@ static void *stdalloc__reallocarray(void *ptr, size_t nelem, size_t elsize, cons
{
size_t newsize;
GIT_UNUSED(file);
GIT_UNUSED(line);
if (GIT_MULTIPLY_SIZET_OVERFLOW(&newsize, nelem, elsize))
return NULL;
return GIT_MULTIPLY_SIZET_OVERFLOW(&newsize, nelem, elsize) ?
NULL : realloc(ptr, newsize);
return stdalloc__realloc(ptr, newsize, file, line);
}
static void *stdalloc__mallocarray(size_t nelem, size_t elsize, const char *file, int line)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment