*/\r
\r
#include "k5-int.h"\r
+#include "kt-int.h"\r
#include <stdio.h>\r
\r
#define HEIMDAL_COMPATIBLE\r
krb5_error_code KRB5_CALLCONV \r
krb5_mkt_resolve(krb5_context context, const char *name, krb5_keytab *id)\r
{\r
- krb5_mkt_data *data;\r
+ krb5_mkt_data *data = 0;\r
krb5_mkt_list_node *list;\r
krb5_error_code err = 0;\r
\r
err = KTLOCK(*id);\r
if (err) {\r
k5_mutex_destroy(&data->lock);\r
- krb5_xfree(data->name);\r
+ if (data && data->name) \r
+ krb5_xfree(data->name);\r
krb5_xfree(data);\r
- krb5_xfree(list->keytab);\r
+ if (list && list->keytab)\r
+ krb5_xfree(list->keytab);\r
krb5_xfree(list);\r
} else {\r
KTREFCNT(*id)++;\r