ticket: 2782
version_fixed: 1.4
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-4@16911
dc483132-0cff-0310-8789-
dd5450dbe970
+2004-11-26 Ken Raeburn <raeburn@mit.edu>
+
+ * kt_file.c (krb5_ktfile_wresolve): Initialize mutex here too.
+
2004-11-23 Ken Raeburn <raeburn@mit.edu>
* kt_file.c (struct _krb5_ktfile_data): Add mutex and buffer.
krb5_ktfile_wresolve(krb5_context context, const char *name, krb5_keytab *id)
{
krb5_ktfile_data *data;
+ krb5_error_code err;
if ((*id = (krb5_keytab) malloc(sizeof(**id))) == NULL)
return(ENOMEM);
return(ENOMEM);
}
+ err = k5_mutex_init(&data->lock);
+ if (err) {
+ krb5_xfree(*id);
+ return err;
+ }
+
if ((data->name = (char *)calloc(strlen(name) + 1, sizeof(char))) == NULL) {
+ k5_mutex_destroy(&data->lock);
krb5_xfree(data);
krb5_xfree(*id);
return(ENOMEM);