When returning a new error code, set error string.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15328 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -317,8 +317,10 @@ krb5_cc_set_default_name(krb5_context context, const char *name)
|
||||
} else
|
||||
p = strdup(name);
|
||||
|
||||
if (p == NULL)
|
||||
if (p == NULL) {
|
||||
krb5_set_error_string(context, "malloc - out of memory");
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
if (context->default_cc_name)
|
||||
free(context->default_cc_name);
|
||||
@@ -353,8 +355,10 @@ krb5_cc_default(krb5_context context,
|
||||
{
|
||||
const char *p = krb5_cc_default_name(context);
|
||||
|
||||
if (p == NULL)
|
||||
if (p == NULL) {
|
||||
krb5_set_error_string(context, "malloc - out of memory");
|
||||
return ENOMEM;
|
||||
}
|
||||
return krb5_cc_resolve(context, p, id);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user