svn rev #24287: trunk/src/lib/crypto/crypto_tests/
epeisach@MIT.EDU
epeisach at MIT.EDU
Thu Sep 2 22:43:21 EDT 2010
http://src.mit.edu/fisheye/changelog/krb5/?cs=24287
Commit By: epeisach
Log Message:
ticket: 6769
subject: clean up memory leak and potential unused variable in crypto tests
t_prf.c: Ensure prfsz is set before use (not exercised in current tests)
t_short.c: Fix memory leak
Changed Files:
U trunk/src/lib/crypto/crypto_tests/t_prf.c
U trunk/src/lib/crypto/crypto_tests/t_short.c
Modified: trunk/src/lib/crypto/crypto_tests/t_prf.c
===================================================================
--- trunk/src/lib/crypto/crypto_tests/t_prf.c 2010-09-02 15:35:25 UTC (rev 24286)
+++ trunk/src/lib/crypto/crypto_tests/t_prf.c 2010-09-03 02:43:21 UTC (rev 24287)
@@ -75,7 +75,10 @@
free (input.data);
input.data = NULL;
+ } else {
+ prfsz = 0;
}
+
for (; prfsz > 0; prfsz--) {
printf ("%02x",
(unsigned int) ((unsigned char ) output.data[output.length-prfsz]));
Modified: trunk/src/lib/crypto/crypto_tests/t_short.c
===================================================================
--- trunk/src/lib/crypto/crypto_tests/t_short.c 2010-09-02 15:35:25 UTC (rev 24286)
+++ trunk/src/lib/crypto/crypto_tests/t_short.c 2010-09-03 02:43:21 UTC (rev 24287)
@@ -109,6 +109,8 @@
free(input.ciphertext.data);
free(output.data);
}
+ krb5int_c_free_keyblock_contents (NULL, &keyblock);
+
}
int
More information about the cvs-krb5
mailing list