gnutls: fix memory leak when using gnutls >= 1.3.1 84/24484/1
authorPatrick Ohly <patrick.ohly@intel.com>
Tue, 15 Jul 2014 08:09:55 +0000 (10:09 +0200)
committerPatrick Ohly <patrick.ohly@intel.com>
Tue, 15 Jul 2014 08:47:28 +0000 (10:47 +0200)
commit8094cbbe0b64da9bc251177c4ddcc82a90979071
tree291cd14e15218c6e9e5bf7aee25dc722d4cb6f59
parentdc63c9a25745ce9d46671af3fdfb1255f54cf6ad
gnutls: fix memory leak when using gnutls >= 1.3.1

When using gnutls_session_get_data2() to allocate
ctx->cache.client.data, we must free it with gnutls_free to deallocate
it.

When using an older gnutls without that method, we allocate the data
ourselves and must continue to use ne_free().

Originally reported by Werner Baumann.

Change-Id: Ifdfa9916f488767f8d501fd083cce3cfd9c7ba74
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
src/ne_gnutls.c