X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/383e235b5f9f031f93af4795a1162909577a4d74..f1140c41e9297d14386ee18fbed7a9686d223024:/mpmont.c diff --git a/mpmont.c b/mpmont.c index d000f8d..a6dabe3 100644 --- a/mpmont.c +++ b/mpmont.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: mpmont.c,v 1.12 2000/10/08 15:48:35 mdw Exp $ + * $Id: mpmont.c,v 1.13 2001/02/03 12:00:29 mdw Exp $ * * Montgomery reduction * @@ -30,6 +30,10 @@ /*----- Revision history --------------------------------------------------* * * $Log: mpmont.c,v $ + * Revision 1.13 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. + * * Revision 1.12 2000/10/08 15:48:35 mdw * Rename Karatsuba constants now that we have @gfx_kmul@ too. * @@ -548,10 +552,8 @@ done: mp_drop(tab[i]); xfree(tab); exit: - if (d != MP_NEW) - mp_drop(d); - if (spare) - mp_drop(spare); + mp_drop(d); + mp_drop(spare); return (x); }