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: v7.6.2~437 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=627fd4c51173341c17bcb6545000ab18948c8b09;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 839c3144..b7688b06 100644 --- a/typd_mlc.c +++ b/typd_mlc.c @@ -682,7 +682,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;