summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-04-25 21:40:55 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-04-25 21:40:55 +0300
commit223ce4fdf375a59dc963dc57dd900cb7f37bc8d0 (patch)
tree26089990525a0ca0a9b7da83d2b15c962aae4cfc
parent2487dabc7dceb436d804d225fc48d4f39fdafb61 (diff)
downloadbdwgc-223ce4fdf375a59dc963dc57dd900cb7f37bc8d0.tar.gz
Invoke GC_oom_fn if GC_make_array_descriptor failed because of no memory
* typd_mlc.c (GC_calloc_explicitly_typed): If descr_type is NO_MEM then return the result of GC_get_oom_fn()(lb).
-rw-r--r--typd_mlc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/typd_mlc.c b/typd_mlc.c
index 304943d7..8325b1b5 100644
--- a/typd_mlc.c
+++ b/typd_mlc.c
@@ -491,7 +491,7 @@ GC_API GC_ATTR_MALLOC void * GC_CALL GC_calloc_explicitly_typed(size_t n,
lb *= n;
switch(descr_type) {
case NO_MEM:
- return NULL;
+ return (*GC_get_oom_fn())(lb);
case SIMPLE:
return GC_malloc_explicitly_typed(lb, simple_d);
case LEAF: