summaryrefslogtreecommitdiff
path: root/src/allocators/stdalloc.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-07-20 08:25:59 -0400
committerGitHub <noreply@github.com>2021-07-20 08:25:59 -0400
commitb0980dcfb35fe1c8f783001296b4fea6b7373058 (patch)
tree02bd37dc716aaca0311c3132440d0a4adb89f137 /src/allocators/stdalloc.c
parentc69852d6bc254bbbfabb621f740d28f263877a76 (diff)
downloadlibgit2-b0980dcfb35fe1c8f783001296b4fea6b7373058.tar.gz
Update src/allocators/stdalloc.c
Co-authored-by: lhchavez <lhchavez@lhchavez.com>
Diffstat (limited to 'src/allocators/stdalloc.c')
-rw-r--r--src/allocators/stdalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/allocators/stdalloc.c b/src/allocators/stdalloc.c
index 7215468b6..2b36d9f3d 100644
--- a/src/allocators/stdalloc.c
+++ b/src/allocators/stdalloc.c
@@ -35,7 +35,7 @@ static void *stdalloc__calloc(size_t nelem, size_t elsize, const char *file, int
GIT_UNUSED(line);
#ifdef GIT_DEBUG_STRICT_ALLOC
- if (!elsize)
+ if (!elsize || !nelem)
return NULL;
#endif