From: Luke Howard Date: Mon, 31 Aug 2009 07:00:24 +0000 (+0000) Subject: krb5_authdata_export_attributes should not fail if there are no attributes to export X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3969ce2c4a8ad65e88a8ec0ac52901a87d5c078b;p=thirdparty%2Fkrb5.git krb5_authdata_export_attributes should not fail if there are no attributes to export git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/authdata@22676 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/authdata.c b/src/lib/krb5/krb/authdata.c index 83773b90b0..8b5ef6031d 100644 --- a/src/lib/krb5/krb/authdata.c +++ b/src/lib/krb5/krb/authdata.c @@ -672,7 +672,7 @@ krb5_authdata_export_attributes(krb5_context kcontext, krb5_authdata ***pauthdata) { int i; - krb5_error_code code = ENOENT; + krb5_error_code code = 0; krb5_authdata **authdata = NULL; unsigned int len = 0; @@ -716,7 +716,8 @@ krb5_authdata_export_attributes(krb5_context kcontext, len += j; } - authdata[len] = NULL; + if (authdata != NULL) + authdata[len] = NULL; *pauthdata = authdata;