]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Fix mem leak.
authorSimon Josefsson <simon@josefsson.org>
Tue, 11 Nov 2008 15:09:41 +0000 (16:09 +0100)
committerSimon Josefsson <simon@josefsson.org>
Tue, 11 Nov 2008 15:09:41 +0000 (16:09 +0100)
lib/gnutls_extensions.c
lib/gnutls_extensions.h
lib/gnutls_global.c

index 4686e4fcdb272697ce1c2166f9b9691448d96d47..16e58373d744fbe2edf5238777478bdc9e188007 100644 (file)
@@ -327,6 +327,12 @@ _gnutls_ext_init (void)
   return GNUTLS_E_SUCCESS;
 }
 
+int
+_gnutls_ext_deinit (void)
+{
+  gnutls_free (extfunc);
+}
+
 /**
  * gnutls_ext_register - Register a handler for a TLS extension
  * @type: the 16-bit integer referring to the extension type
index 03e79881fcbd5cfcd3a4e3e6f7b3829cbaa7a54c..53bcb4175c6f19b2090d2739f6f02f2a41e9d990 100644 (file)
@@ -28,3 +28,4 @@ int _gnutls_parse_extensions (gnutls_session_t session,
 int _gnutls_gen_extensions (gnutls_session_t session, opaque * data,
                            size_t data_size);
 int _gnutls_ext_init (void);
+int _gnutls_ext_deinit (void);
index f8cac0cbd874544f3f8135f672e8f6778947b176..737a3b2e140bd7b60788def5146081b00325413c 100644 (file)
@@ -296,6 +296,7 @@ gnutls_global_deinit (void)
     {
       gl_sockets_cleanup ();
       _gnutls_rnd_deinit ();
+      _gnutls_ext_deinit ();
       asn1_delete_structure (&_gnutls_gnutls_asn);
       asn1_delete_structure (&_gnutls_pkix1_asn);
       _gnutls_crypto_deregister ();