From: Ivan Maidanski Date: Thu, 15 Sep 2016 06:47:23 +0000 (+0300) Subject: Fix double multiplication of lb by n in calloc_explicitly_typed X-Git-Tag: v8.0.0~1150 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=846d937b4a3d558307dfa4764df67ca5c093c8fb;p=gc Fix double multiplication of lb by n in calloc_explicitly_typed * typd_mlc.c (GC_calloc_explicitly_typed): Do not multiply lb by n twice (when passed to GC_malloc in case of GC_general_register_disappearing_link fails). --- diff --git a/typd_mlc.c b/typd_mlc.c index 8e92cda1..104e7c43 100644 --- a/typd_mlc.c +++ b/typd_mlc.c @@ -683,7 +683,7 @@ GC_API GC_ATTR_MALLOC void * GC_CALL GC_calloc_explicitly_typed(size_t n, /* Couldn't register it due to lack of memory. Punt. */ /* This will probably fail too, but gives the recovery code */ /* a chance. */ - return(GC_malloc(n*lb)); + return GC_malloc(lb); } } return op;