aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gtls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gtls.c b/lib/gtls.c
index 3def5d998..73461b9cc 100644
--- a/lib/gtls.c
+++ b/lib/gtls.c
@@ -502,7 +502,8 @@ static void close_one(struct connectdata *conn,
gnutls_bye(conn->ssl[index].session, GNUTLS_SHUT_RDWR);
gnutls_deinit(conn->ssl[index].session);
}
- gnutls_certificate_free_credentials(conn->ssl[index].cred);
+ if(conn->ssl[index].cred)
+ gnutls_certificate_free_credentials(conn->ssl[index].cred);
}
void Curl_gtls_close(struct connectdata *conn)