[glib-networking/mcatanzaro/base-rebase] gnutls: fix leak of ALPN protocols
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/mcatanzaro/base-rebase] gnutls: fix leak of ALPN protocols
- Date: Mon, 13 May 2019 16:28:34 +0000 (UTC)
commit 2814a16682f8193ea1998590118248391981d848
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon May 13 11:00:05 2019 -0500
gnutls: fix leak of ALPN protocols
GnuTLS will handle the copying.
tls/gnutls/gtlsconnection-gnutls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index 927c3e5..a673f07 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -822,7 +822,7 @@ g_tls_connection_gnutls_prepare_handshake (GTlsConnectionBase *tls,
for (i = 0; advertised_protocols[i]; i++)
{
protocols[i].size = strlen (advertised_protocols[i]);
- protocols[i].data = g_memdup (advertised_protocols[i], protocols[i].size);
+ protocols[i].data = (guchar *)advertised_protocols[i];
}
gnutls_alpn_set_protocols (priv->session, protocols, n_protos, 0);
g_free (protocols);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]