From 2a474bd8097ce1797a401ef15d1397be5ccdd792 Mon Sep 17 00:00:00 2001 From: Dmitry Podgorny Date: Sat, 24 Jun 2017 16:26:39 +0300 Subject: [PATCH] tls/schannel: fix memory leak Assume InitializeSecurityContext() doesn't change pszTargetName. Reported by @youzpp in metajack/libstrophe#35. --- src/tls_schannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tls_schannel.c b/src/tls_schannel.c index 10b3fbd..b63d2ac 100644 --- a/src/tls_schannel.c +++ b/src/tls_schannel.c @@ -223,7 +223,7 @@ int tls_start(tls_t *tls) char *name; /* use the domain there as our name */ - name = strdup(tls->conn->domain); + name = tls->conn->domain; ctxtreq = ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT | ISC_REQ_CONFIDENTIALITY | ISC_RET_EXTENDED_ERROR