summaryrefslogtreecommitdiff
path: root/tests/mini-loss-time.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-05-05 16:40:37 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-05-05 16:42:14 +0200
commit4b9a7cf0dd08a82ff17f289d4182c5be95987f68 (patch)
tree379cfbf77fc68e901ba3fc710cbecc71f6d0cdad /tests/mini-loss-time.c
parenta1962b06306e34114fc3297bc70436532eaca128 (diff)
downloadgnutls-4b9a7cf0dd08a82ff17f289d4182c5be95987f68.tar.gz
tests: eliminate mem leaks in mini-loss-time
Diffstat (limited to 'tests/mini-loss-time.c')
-rw-r--r--tests/mini-loss-time.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/mini-loss-time.c b/tests/mini-loss-time.c
index 637b58a450..db3ff549b7 100644
--- a/tests/mini-loss-time.c
+++ b/tests/mini-loss-time.c
@@ -159,6 +159,7 @@ static void client(int fd)
while (ret < 0 && (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED));
gnutls_deinit(session);
+ gnutls_anon_free_client_credentials(anoncred);
gnutls_global_deinit();
if (ret < 0) {
@@ -193,7 +194,6 @@ static void server(int fd, int packet)
gnutls_anon_allocate_server_credentials(&anoncred);
-
gnutls_init(&session, GNUTLS_SERVER | GNUTLS_DATAGRAM);
gnutls_dtls_set_mtu(session, 1500);
gnutls_dtls_set_timeouts(session, 1 * 1000, 30 * 1000);
@@ -219,6 +219,7 @@ static void server(int fd, int packet)
while (ret < 0 && (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED));
gnutls_deinit(session);
+ gnutls_anon_free_server_credentials(anoncred);
gnutls_global_deinit();
if (ret < 0) {