X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/dcdc42e7356a0ae7c4d16728c8afff51f76f4546..518b94a41c150a27621a631056b1f9895546d26a:/mpcrt.c diff --git a/mpcrt.c b/mpcrt.c index 18c622f..17bc6ad 100644 --- a/mpcrt.c +++ b/mpcrt.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: mpcrt.c,v 1.4 2001/04/19 18:25:38 mdw Exp $ + * $Id: mpcrt.c,v 1.5 2001/04/29 17:39:33 mdw Exp $ * * Chinese Remainder Theorem computations (Gauss's algorithm) * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: mpcrt.c,v $ + * Revision 1.5 2001/04/29 17:39:33 mdw + * Fix memory leak. + * * Revision 1.4 2001/04/19 18:25:38 mdw * Use mpmul for the multiplication. * @@ -88,7 +91,6 @@ void mpcrt_create(mpcrt *c, mpcrt_mod *v, size_t k, mp *n) else { mpmul mm; mpmul_init(&mm); - n = MP_COPY(v[0].m); for (i = 0; i < k; i++) mpmul_add(&mm, v[i].m); n = mpmul_done(&mm);