From: simon Date: Sun, 4 Aug 2013 22:33:50 +0000 (+0000) Subject: Fix memory leaks in the new error return from modinv. X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/c6456dca1747ae0820811242117c1fa3a22a8d10 Fix memory leaks in the new error return from modinv. git-svn-id: svn://svn.tartarus.org/sgt/putty@9992 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/sshbn.c b/sshbn.c index a2067831..ec7d3a6d 100644 --- a/sshbn.c +++ b/sshbn.c @@ -1642,6 +1642,10 @@ Bignum modinv(Bignum number, Bignum modulus) * Found a common factor between the inputs, so we cannot * return a modular inverse at all. */ + freebn(b); + freebn(a); + freebn(xp); + freebn(x); return NULL; }