* duplicate_name.c (krb5_gss_duplicate_name):
* export_name.c (krb5_gss_export_name): Fix gsstest nit by
clearing minor_status if no errors.
ticket: new
target_version: 1.4.3
tags: pullup
component: krb5-libs
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17385
dc483132-0cff-0310-8789-
dd5450dbe970
2005-09-21 Tom Yu <tlyu@mit.edu>
+ * duplicate_name.c (krb5_gss_duplicate_name):
+ * export_name.c (krb5_gss_export_name): Fix gsstest nit by
+ clearing minor_status if no errors.
+
* inq_cred.c (krb5_gss_inquire_cred): Initialize ret_name to
NULL. Only call kg_save_name() if ret_name is actually non-NULL.
Return GSS_C_NO_NAME for now if no principal name in the cred.
krb5_error_code code;
krb5_principal princ, outprinc;
+ if (minor_status)
+ *minor_status = 0;
+
code = krb5_init_context(&context);
if (code) {
- *minor_status = code;
+ if (minor_status)
+ *minor_status = code;
return GSS_S_FAILURE;
}
size_t length;
char *str, *cp;
+ if (minor_status)
+ *minor_status = 0;
+
code = krb5_init_context(&context);
if (code) {
- *minor_status = code;
+ if (minor_status)
+ *minor_status = code;
return GSS_S_FAILURE;
}
if ((code = krb5_unparse_name(context, (krb5_principal) input_name,
&str))) {
- *minor_status = code;
+ if (minor_status)
+ *minor_status = code;
krb5_free_context(context);
return(GSS_S_FAILURE);
}
exported_name->value = malloc(exported_name->length);
if (!exported_name->value) {
free(str);
- *minor_status = ENOMEM;
+ if (minor_status)
+ *minor_status = ENOMEM;
return(GSS_S_FAILURE);
}
cp = exported_name->value;