]> granicus.if.org Git - gc/commitdiff
Fix double multiplication of lb by n in calloc_explicitly_typed
authorIvan Maidanski <ivmai@mail.ru>
Thu, 15 Sep 2016 06:47:23 +0000 (09:47 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 1 Nov 2016 23:24:58 +0000 (02:24 +0300)
* 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).

typd_mlc.c

index fde085055de01975c21643e5aa990325c77ef25c..736a526817e77d40cb6e60a7cccdeccc278dcaba 100644 (file)
@@ -751,7 +751,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((void *) op);