free more bn that was allocated
authorLove Hornquist Astrand <lha@h5l.org>
Wed, 29 Sep 2010 05:12:20 +0000 (22:12 -0700)
committerLove Hornquist Astrand <lha@h5l.org>
Wed, 29 Sep 2010 05:12:20 +0000 (22:12 -0700)
lib/hcrypto/rsa-ltm.c

index 03997b55ef4b297cff9bda0f33fd7cd7c2ce78d2..f4828104b651c1af9742d291b2ae9a0ab94949c5 100644 (file)
@@ -398,7 +398,7 @@ ltm_rsa_private_decrypt(int flen, const unsigned char* from,
     if (flen > size)
        return -2;
 
-    mp_init_multi(&in, &n, &e, &out, &bi, &b, NULL);
+    mp_init_multi(&in, &n, &e, &out, &b, &bi, NULL);
 
     BN2mpz(&n, rsa->n);
     BN2mpz(&e, rsa->e);
@@ -479,7 +479,7 @@ ltm_rsa_private_decrypt(int flen, const unsigned char* from,
     memmove(to, ptr, size);
 
  out:
-    mp_clear_multi(&e, &n, &in, &out, NULL);
+    mp_clear_multi(&e, &n, &in, &out, &b, &bi, NULL);
 
     return size;
 }