Mercurial > pidgin
changeset 17911:91feef6cbede
- GnuTLS uses glib memory mgmt
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Sat, 02 Jun 2007 00:14:38 +0000 |
parents | 668a294f9a72 |
children | 945b60f02767 |
files | libpurple/plugins/ssl/ssl-gnutls.c |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/plugins/ssl/ssl-gnutls.c Fri Jun 01 23:54:46 2007 +0000 +++ b/libpurple/plugins/ssl/ssl-gnutls.c Sat Jun 02 00:14:38 2007 +0000 @@ -46,6 +46,17 @@ static void ssl_gnutls_init_gnutls(void) { + /* Configure GnuTLS to use glib memory management */ + /* I expect that this isn't really necessary, but it may prevent + some bugs */ + gnutls_global_set_mem_functions( + g_malloc0, /* malloc */ + g_malloc0, /* secure malloc */ + NULL, /* mem_is_secure */ + g_realloc, /* realloc */ + g_free /* free */ + ); + gnutls_global_init(); gnutls_certificate_allocate_credentials(&xcred);