From 518b94a41c150a27621a631056b1f9895546d26a Mon Sep 17 00:00:00 2001 From: mdw Date: Sun, 29 Apr 2001 17:39:33 +0000 Subject: [PATCH 1/1] Fix memory leak. --- mpcrt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- 2.11.0