summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-07-20 21:49:28 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-07-31 22:04:23 +0200
commit272854367efc130fbd4f1a51840d80c630214e12 (patch)
treef9e4ebb37e90bf5501729ebff609bf4d1bf95ddc
parentd2f702a2fac56058f589d232cda3d159d02bf7e3 (diff)
downloadgnutls-272854367efc130fbd4f1a51840d80c630214e12.tar.gz
Reset the output value on error in _gnutls_x509_dn_to_string()
Reported by Kurt Roeckx.
-rw-r--r--lib/x509/common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/x509/common.c b/lib/x509/common.c
index 94b6bbc375..9a4b96ffe3 100644
--- a/lib/x509/common.c
+++ b/lib/x509/common.c
@@ -469,6 +469,7 @@ _gnutls_x509_dn_to_string(const char *oid, void *value,
if (ret < 0) {
gnutls_assert();
gnutls_free(str->data);
+ str->data = NULL;
return ret;
}
str->size = size;