reformat, avoid free-ing un-init'd memory
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16780 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -200,7 +200,6 @@ string_to_key_test(krb5_context context)
|
||||
{
|
||||
krb5_data password, opaque;
|
||||
krb5_error_code ret;
|
||||
krb5_keyblock key;
|
||||
krb5_salt salt;
|
||||
int i, val = 0;
|
||||
char iter[4];
|
||||
@@ -242,15 +241,20 @@ string_to_key_test(krb5_context context)
|
||||
printf("PBKDF2:\n");
|
||||
hex_dump_data(keyout, keys[i].keylen);
|
||||
}
|
||||
|
||||
krb5_free_keyblock_contents(context, &key);
|
||||
}
|
||||
|
||||
ret = krb5_string_to_key_data_salt_opaque (context, keys[i].enctype,
|
||||
password, salt, opaque,
|
||||
{
|
||||
krb5_keyblock key;
|
||||
|
||||
ret = krb5_string_to_key_data_salt_opaque (context,
|
||||
keys[i].enctype,
|
||||
password,
|
||||
salt,
|
||||
opaque,
|
||||
&key);
|
||||
if (ret) {
|
||||
krb5_warn(context, ret, "%d: string_to_key_data_salt_opaque", i);
|
||||
krb5_warn(context, ret, "%d: string_to_key_data_salt_opaque",
|
||||
i);
|
||||
val = 1;
|
||||
continue;
|
||||
}
|
||||
@@ -275,6 +279,7 @@ string_to_key_test(krb5_context context)
|
||||
}
|
||||
krb5_free_keyblock_contents(context, &key);
|
||||
}
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user