From: John Kohl Date: Thu, 1 Feb 1990 15:11:55 +0000 (+0000) Subject: re-do interface to fill in pointed-to struct X-Git-Tag: krb5-1.0-alpha2~1160 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5660f036b40ad8d75dcd7c1199ea9de43ed59942;p=krb5.git re-do interface to fill in pointed-to struct git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@223 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/mk_error.c b/src/lib/krb5/krb/mk_error.c index d5b1a241c..c985f3fed 100644 --- a/src/lib/krb5/krb/mk_error.c +++ b/src/lib/krb5/krb/mk_error.c @@ -20,6 +20,8 @@ static char rcsid_mk_error_c [] = #include #include +#include + /* formats the error structure *dec_err into an error buffer *enc_err. @@ -31,7 +33,14 @@ static char rcsid_mk_error_c [] = krb5_error_code krb5_mk_error(dec_err, enc_err) krb5_error *dec_err; -krb5_data **enc_err; +krb5_data *enc_err; { - return (encode_krb5_error(dec_err, enc_err)); + krb5_error_code retval; + krb5_data *new_enc_err; + + if (retval = encode_krb5_error(dec_err, &new_enc_err)) + return(retval); + *enc_err = *new_enc_err; + (void)free((char *)new_enc_err); + return 0; }