Skip to content

Commit b0980dc

Browse files
ethomsonlhchavez
andauthored
Update src/allocators/stdalloc.c
Co-authored-by: lhchavez <lhchavez@lhchavez.com>
1 parent c69852d commit b0980dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/allocators/stdalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static void *stdalloc__calloc(size_t nelem, size_t elsize, const char *file, int
3535
GIT_UNUSED(line);
3636

3737
#ifdef GIT_DEBUG_STRICT_ALLOC
38-
if (!elsize)
38+
if (!elsize || !nelem)
3939
return NULL;
4040
#endif
4141

0 commit comments

Comments
 (0)