Missed a case in the checked-in (and pulled-up) fix to 2781.
* kt_file.c (krb5_ktfile_wresolve): Initialize mutex here too.
ticket: new
status: open
target_version: 1.4
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16908
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);