diff options
author | Ezra Peisach <epeisach@mit.edu> | 2000-02-28 16:32:47 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 2000-02-28 16:32:47 +0000 |
commit | 11725a734ce7c730ca5ea65b7492c1bc451f7e27 (patch) | |
tree | 60401b5e329b0abd30c6596125ad90f89fda7e8e /src/kadmin/v5passwdd/proto_serv.c | |
parent | 337b0c3c8f85b48f2b775c4cb49559d6087619a7 (diff) | |
download | krb5-11725a734ce7c730ca5ea65b7492c1bc451f7e27.tar.gz krb5-11725a734ce7c730ca5ea65b7492c1bc451f7e27.tar.xz krb5-11725a734ce7c730ca5ea65b7492c1bc451f7e27.zip |
* proto_serv.c (proto_serv): For error return,strdup the returned
value from error_message to maintain its const status.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12087 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kadmin/v5passwdd/proto_serv.c')
-rw-r--r-- | src/kadmin/v5passwdd/proto_serv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kadmin/v5passwdd/proto_serv.c b/src/kadmin/v5passwdd/proto_serv.c index 6c7e22772..413c5efe8 100644 --- a/src/kadmin/v5passwdd/proto_serv.c +++ b/src/kadmin/v5passwdd/proto_serv.c @@ -815,12 +815,13 @@ proto_serv(kcontext, my_id, cl_sock, sv_p, cl_p) if (errbuf.error > 127) errbuf.error = KRB5KRB_ERR_GENERIC; /* Format the error message in our language */ - errmsg = error_message(kret); + errmsg = strdup(error_message(kret)); errbuf.text.length = strlen(errmsg); errbuf.text.data = errmsg; er_kret = krb5_mk_error(kcontext, &errbuf, &errout); if (!er_kret) krb5_write_message(kcontext, (krb5_pointer) &cl_sock, &errout); + if(errmsg) free(errmsg); free(errbuf.text.data); krb5_free_data_contents(kcontext, &errout); } |