Alex Jia 3a89819de8 tests: avoid memory leak on testTLSSessionInit
* tests/virnettlscontexttest: fix memory leak on virnettlscontext test case.

* Detected in valgrind run:

==25667==
==25667== 86,651 (34,680 direct, 51,971 indirect) bytes in 10 blocks are
definitely lost in loss record 350 of 351
==25667==    at 0x4005447: calloc (vg_replace_malloc.c:467)
==25667==    by 0x4F1F515D: gnutls_init (gnutls_state.c:270)
==25667==    by 0x8053432: virNetTLSSessionNew (virnettlscontext.c:1181)
==25667==    by 0x804DD24: testTLSSessionInit (virnettlscontexttest.c:624)
==25667==    by 0x804F14D: virtTestRun (testutils.c:140)
==25667==
==25667== 100,578 (38,148 direct, 62,430 indirect) bytes in 11 blocks are
definitely lost in loss record 351 of 351
==25667==    at 0x4005447: calloc (vg_replace_malloc.c:467)
==25667==    by 0x4F1F515D: gnutls_init (gnutls_state.c:270)
==25667==    by 0x8053432: virNetTLSSessionNew (virnettlscontext.c:1181)
==25667==    by 0x804DD3C: testTLSSessionInit (virnettlscontexttest.c:625)
==25667==    by 0x804F14D: virtTestRun (testutils.c:140)

* How to reproduce?
% cd libvirt && ./configure && make && make -C tests valgrind
or
% valgrind -v --leak-check=full ./tests/virnettlscontexttest

Signed-off-by: Alex Jia <ajia@redhat.com>
2011-09-08 11:03:34 +01:00
..
2010-05-12 08:41:10 +02:00
2011-07-11 19:38:51 +02:00
2011-04-29 10:21:20 -06:00
2011-04-29 14:26:40 -06:00
2011-06-30 18:04:02 +01:00
2009-10-07 12:18:13 +02:00
2009-10-07 12:18:13 +02:00
2011-06-24 08:01:10 -06:00
2011-09-02 23:38:52 +08:00
2011-04-29 10:21:20 -06:00
2010-05-12 08:41:10 +02:00
2011-04-29 10:21:20 -06:00
2010-05-12 08:41:10 +02:00
2011-07-11 09:21:37 -06:00
2011-07-21 10:34:51 -06:00
2009-07-16 15:06:42 +02:00
2010-05-12 08:41:10 +02:00
2010-05-12 08:41:10 +02:00
2010-05-12 08:41:10 +02:00
2010-05-12 08:41:10 +02:00
2011-07-11 19:38:51 +02:00
2011-07-11 19:38:51 +02:00