aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2000-02-28 16:32:47 +0000
committerEzra Peisach <epeisach@mit.edu>2000-02-28 16:32:47 +0000
commit11725a734ce7c730ca5ea65b7492c1bc451f7e27 (patch)
tree60401b5e329b0abd30c6596125ad90f89fda7e8e
parent337b0c3c8f85b48f2b775c4cb49559d6087619a7 (diff)
downloadkrb5-11725a734ce7c730ca5ea65b7492c1bc451f7e27.zip
krb5-11725a734ce7c730ca5ea65b7492c1bc451f7e27.tar.gz
krb5-11725a734ce7c730ca5ea65b7492c1bc451f7e27.tar.bz2
* 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
-rw-r--r--src/kadmin/v5passwdd/ChangeLog5
-rw-r--r--src/kadmin/v5passwdd/proto_serv.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/kadmin/v5passwdd/ChangeLog b/src/kadmin/v5passwdd/ChangeLog
index f94ed38..a63cc97 100644
--- a/src/kadmin/v5passwdd/ChangeLog
+++ b/src/kadmin/v5passwdd/ChangeLog
@@ -1,3 +1,8 @@
+2000-02-28 Ezra Peisach <epeisach@mit.edu>
+
+ * proto_serv.c (proto_serv): For error return,strdup the returned
+ value from error_message to maintain its const status.
+
1999-10-26 Tom Yu <tlyu@mit.edu>
* Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
diff --git a/src/kadmin/v5passwdd/proto_serv.c b/src/kadmin/v5passwdd/proto_serv.c
index 6c7e227..413c5ef 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);
}