svn rev #22275: trunk/src/lib/krb5/asn.1/
ghudson@MIT.EDU
ghudson at MIT.EDU
Thu Apr 23 10:55:42 EDT 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22275
Commit By: ghudson
Log Message:
Close a memory leak in asn1_decode_etype_info2_entry_1_3.
Changed Files:
U trunk/src/lib/krb5/asn.1/asn1_k_decode.c
Modified: trunk/src/lib/krb5/asn.1/asn1_k_decode.c
===================================================================
--- trunk/src/lib/krb5/asn.1/asn1_k_decode.c 2009-04-23 14:52:25 UTC (rev 22274)
+++ trunk/src/lib/krb5/asn.1/asn1_k_decode.c 2009-04-23 14:55:42 UTC (rev 22275)
@@ -1209,6 +1209,8 @@
static asn1_error_code asn1_decode_etype_info2_entry_1_3(asn1buf *buf, krb5_etype_info_entry *val )
{
+ krb5_octet *params = NULL;
+
setup();
val->salt = NULL;
val->s2kparams.data = NULL;
@@ -1219,10 +1221,10 @@
} else
val->length = KRB5_ETYPE_NO_SALT;
if ( tagnum ==2) {
- krb5_octet *params ;
get_lenfield( val->s2kparams.length, params,
2, asn1_decode_octetstring);
val->s2kparams.data = ( char *) params;
+ params = NULL;
} else
val->s2kparams.length = 0;
end_structure();
@@ -1231,6 +1233,7 @@
return 0;
error_out:
krb5_free_data_contents(NULL, &val->s2kparams);
+ free(params);
free(val->salt);
val->salt = NULL;
return retval;
More information about the cvs-krb5
mailing list