]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - sshdss.c
Fix another giant batch of resource leaks. (Mostly memory, but there's
[PuTTY.git] / sshdss.c
index 0484c44320a54803628e40ea04e25a1fbbab07b7..532c13f2e49ac59ba485d970e43bba5018a3dae0 100644 (file)
--- a/sshdss.c
+++ b/sshdss.c
@@ -289,6 +289,8 @@ static int dss_verifysig(void *key, char *sig, int siglen,
 
     freebn(w);
     freebn(sha);
+    freebn(u1);
+    freebn(u2);
     freebn(gu1p);
     freebn(yu2p);
     freebn(gu1yu2p);
@@ -404,6 +406,7 @@ static void *dss_createkey(unsigned char *pub_blob, int pub_len,
     ytest = modpow(dss->g, dss->x, dss->p);
     if (0 != bignum_cmp(ytest, dss->y)) {
        dss_freekey(dss);
+        freebn(ytest);
        return NULL;
     }
     freebn(ytest);