(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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user