diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-06-07 18:11:22 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-06-07 18:11:22 +0200 |
commit | 616cfbe9408438cb65b9be195a793de1477194b2 (patch) | |
tree | a767153b45e85a64816d3a05ea15287898600ed1 /doc | |
parent | 850af77a606e16c4fecb2725b8ac69b7ac19a0e0 (diff) | |
download | gnutls-616cfbe9408438cb65b9be195a793de1477194b2.tar.gz |
Fix memory leak.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/ex-serv-export.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/examples/ex-serv-export.c b/doc/examples/ex-serv-export.c index 2ff4aa6230..13f5308cca 100644 --- a/doc/examples/ex-serv-export.c +++ b/doc/examples/ex-serv-export.c @@ -1,4 +1,4 @@ -/* Copyright 2007 Free Software Foundation +/* Copyright 2007, 2008 Free Software Foundation * * Copying and distribution of this file, with or without modification, * are permitted in any medium without royalty provided the copyright @@ -248,6 +248,11 @@ main (void) } close (listen_sd); + if (TLS_SESSION_CACHE != 0) + { + wrap_db_deinit (); + } + gnutls_certificate_free_credentials (cert_cred); gnutls_global_deinit (); @@ -288,6 +293,9 @@ wrap_db_init (void) static void wrap_db_deinit (void) { + if (cache_db) + free (cache_db); + cache_db = NULL; return; } |