X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/fbdfd34ebce82921ead337127da7c9c480a1e29d..59919ae4b1721ca271c3d3e5955c09d322573821:/bbs-rand.c diff --git a/bbs-rand.c b/bbs-rand.c index dbca23c..abe1e72 100644 --- a/bbs-rand.c +++ b/bbs-rand.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: bbs-rand.c,v 1.3 2000/06/17 10:45:21 mdw Exp $ + * $Id: bbs-rand.c,v 1.4 2001/02/03 12:00:29 mdw Exp $ * * Blum-Blum-Shub secure random number generator * @@ -30,6 +30,10 @@ /*----- Revision history --------------------------------------------------* * * $Log: bbs-rand.c,v $ + * Revision 1.4 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.3 2000/06/17 10:45:21 mdw * Typesetting fixes. Advertise random number generator strength. Use * secure arena for memory allocation. @@ -134,8 +138,7 @@ void bbs_step(bbs *b) void bbs_set(bbs *b, mp *x) { - if (b->x) - mp_drop(b->x); + mp_drop(b->x); b->x = MP_COPY(x); bbs_step(b); }