summaryrefslogtreecommitdiff
path: root/lib/srp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/srp.c')
-rw-r--r--lib/srp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/srp.c b/lib/srp.c
index 868c7066a0..eb4b8361d9 100644
--- a/lib/srp.c
+++ b/lib/srp.c
@@ -762,16 +762,22 @@ gnutls_srp_verifier(const char *username, const char *password,
size = generator->size;
if (_gnutls_mpi_init_scan_nz(&_g, generator->data, size)) {
gnutls_assert();
+ _gnutls_mpi_release(&_n);
return GNUTLS_E_MPI_SCAN_FAILED;
}
ret = _gnutls_srp_gx(digest, 20, &res->data, _g, _n);
if (ret < 0) {
gnutls_assert();
+ _gnutls_mpi_release(&_n);
+ _gnutls_mpi_release(&_g);
return ret;
}
res->size = ret;
+ _gnutls_mpi_release(&_n);
+ _gnutls_mpi_release(&_g);
+
return 0;
}