summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/x509/mpi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/x509/mpi.c b/lib/x509/mpi.c
index 05d7c8e4ab..af554ff403 100644
--- a/lib/x509/mpi.c
+++ b/lib/x509/mpi.c
@@ -581,8 +581,6 @@ _gnutls_x509_read_uint (ASN1_TYPE node, const char *value, unsigned int *ret)
result = asn1_read_value (node, value, tmpstr, &len);
- gnutls_afree (tmpstr);
-
if (result != ASN1_SUCCESS)
{
gnutls_assert ();
@@ -600,9 +598,12 @@ _gnutls_x509_read_uint (ASN1_TYPE node, const char *value, unsigned int *ret)
else
{
gnutls_assert ();
+ gnutls_afree (tmpstr);
return GNUTLS_E_INTERNAL_ERROR;
}
+ gnutls_afree (tmpstr);
+
return 0;
}