summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-02-17 15:10:40 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-02-17 15:45:54 +0100
commit35873d74bafca36c4cb5c9bf4b828c445d7d18e0 (patch)
treeb8f1a63d36707caf3e38f1362a4d9895ca2af7dd
parent6df0e597cc014d635a97dd136feb102a1bee107d (diff)
downloadgnutls-35873d74bafca36c4cb5c9bf4b828c445d7d18e0.tar.gz
gnutls_x509_crt_list_import: fixed leak on import failure
-rw-r--r--lib/x509/x509.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/x509/x509.c b/lib/x509/x509.c
index c42a948887..07e8be08c7 100644
--- a/lib/x509/x509.c
+++ b/lib/x509/x509.c
@@ -3593,6 +3593,7 @@ gnutls_x509_crt_list_import(gnutls_x509_crt_t * certs,
gnutls_x509_crt_import(certs[count], &tmp,
GNUTLS_X509_FMT_PEM);
if (ret < 0) {
+ count++;
gnutls_assert();
goto error;
}