k5_assert_locked(&((krb5_fcc_data *) id->data)->lock);
+ *princ = NULL;
+
if (data->version == KRB5_FCC_FVNO_1) {
type = KRB5_NT_UNKNOWN;
} else {
if ((*addrs)[i] == NULL) {
krb5_free_addresses(context, *addrs);
return KRB5_CC_NOMEM;
- }
+ }
+ (*addrs)[i]->contents = NULL;
kret = krb5_fcc_read_addr(context, id, (*addrs)[i]);
CHECK(kret);
}
return KRB5_OK;
errout:
- if (*addrs)
+ if (*addrs) {
krb5_free_addresses(context, *addrs);
+ *addrs = NULL;
+ }
return kret;
}
return KRB5_OK;
errout:
- if (keyblock->contents)
+ if (keyblock->contents) {
krb5_xfree(keyblock->contents);
+ keyblock->contents = NULL;
+ }
return kret;
}
data->data[data->length] = 0; /* Null terminate, just in case.... */
return KRB5_OK;
errout:
- if (data->data)
+ if (data->data) {
krb5_xfree(data->data);
+ data->data = NULL;
+ }
return kret;
}
return KRB5_OK;
errout:
- if (addr->contents)
+ if (addr->contents) {
krb5_xfree(addr->contents);
+ addr->contents = NULL;
+ }
return kret;
}
if ((*a)[i] == NULL) {
krb5_free_authdata(context, *a);
return KRB5_CC_NOMEM;
- }
+ }
+ (*a)[i]->contents = NULL;
kret = krb5_fcc_read_authdatum(context, id, (*a)[i]);
CHECK(kret);
}
return KRB5_OK;
errout:
- if (*a)
+ if (*a) {
krb5_free_authdata(context, *a);
+ *a = NULL;
+ }
return kret;
}
return KRB5_OK;
errout:
- if (a->contents)
+ if (a->contents) {
krb5_xfree(a->contents);
+ a->contents = NULL;
+ }
return kret;
}