gnutls_ext_register causing memory corruption
Simon Josefsson
simon at josefsson.org
Mon Jun 8 18:34:08 CEST 2009
Does this patch work?
I haven't tested it, but it seems gnutls_global_init ->
gnutls_global_deinit -> gnutls_global_init would crash like the crash in
the bug report. GnuTLS 2.6.x had a memory leak and didn't release this
memory, so you wouldn't notice.
/Simon
diff --git a/lib/gnutls_extensions.c b/lib/gnutls_extensions.c
index e4e536f..accb204 100644
--- a/lib/gnutls_extensions.c
+++ b/lib/gnutls_extensions.c
@@ -331,6 +331,7 @@ void
_gnutls_ext_deinit (void)
{
gnutls_free (extfunc);
+ extfunc = NULL;
}
/**
More information about the Gnutls-devel
mailing list