X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/f46efa79cd2bb9adc81541f1218965f85a6b2eef..432c4e184d44704511a5991b80224a87cb1d4613:/mp-sqrt.c diff --git a/mp-sqrt.c b/mp-sqrt.c index 7b65ec0..83880f9 100644 --- a/mp-sqrt.c +++ b/mp-sqrt.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: mp-sqrt.c,v 1.3 2001/02/03 12:00:29 mdw Exp $ + * $Id: mp-sqrt.c,v 1.4 2004/03/27 17:54:11 mdw Exp $ * * Compute integer square roots * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: mp-sqrt.c,v $ + * Revision 1.4 2004/03/27 17:54:11 mdw + * Standard curves and curve checking. + * * Revision 1.3 2001/02/03 12:00:29 mdw * Now @mp_drop@ checks its argument is non-NULL before attempting to free * it. Note that the macro version @MP_DROP@ doesn't do this. @@ -85,7 +88,6 @@ mp *mp_sqrt(mp *d, mp *a) z >>= 1; mp_copy(a); d = mp_lsr(d, a, z); - mp_drop(a); /* --- Main approximation --- * * @@ -118,6 +120,7 @@ mp *mp_sqrt(mp *d, mp *a) /* --- Finished, at last --- */ + mp_drop(a); mp_drop(q); mp_drop(r); return (d);