Cleanup memory in asn.1 testsuite to allow for leak checking
authorEzra Peisach <epeisach@mit.edu>
Mon, 12 May 2003 09:29:46 +0000 (09:29 +0000)
committerEzra Peisach <epeisach@mit.edu>
Mon, 12 May 2003 09:29:46 +0000 (09:29 +0000)
commitdac851d4a5f25c7924d5bdd48900f3b56f5db275
treebd2f7202b59fd165a58231acf4e0ec9c4dd723e8
parentb7d2f686d8c563ab64636974d64b5fae92ad1766
Cleanup memory in asn.1 testsuite to allow for leak checking

* krb5_decode_test.c: Modify decode_run macro to take a cleanup
handler to free allocated memory. Add static handlers to free
krb5_alt_method, passwd_phrase_element and krb5_enc_data as the
krb5 library does not handle at this time.

* krb5_encode_test.c: Free krb5_context at end. Utilize the many
ktest_empty and detroy functions to cleanup memory.

* ktest.h, ktest.c: Add many ktest free and empty functions to
cleanup allocated structures in tests.

* utility.c (krb5_data_hex_parse): Free temporary data.

With these changes, one can then test for memory leaks in the
asn.1 and krb5_free functions.

ticket: new
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15413 dc483132-0cff-0310-8789-dd5450dbe970
src/tests/asn.1/ChangeLog
src/tests/asn.1/krb5_decode_test.c
src/tests/asn.1/krb5_encode_test.c
src/tests/asn.1/ktest.c
src/tests/asn.1/ktest.h
src/tests/asn.1/utility.c