(default_s2k_func): avoid exposing free-ed memory on error. Found by

IBM checker.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16939 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-04-02 01:10:35 +00:00
parent 3abd33be22
commit 0c29fd2ed1

View File

@@ -79,8 +79,10 @@ default_s2k_func(krb5_context context, krb5_enctype type,
return ENOMEM;
ret = krb5_string_to_key_data_salt_opaque(context, type, password,
salt, opaque, *key);
if (ret)
if (ret) {
free(*key);
*key = NULL;
}
return ret;
}