From 659b61a48aee8c82c161c1f6a5fdb850bfebd0e5 Mon Sep 17 00:00:00 2001 From: Barry Jaspan Date: Wed, 6 Nov 1996 21:22:52 +0000 Subject: [PATCH] * svr_principal.c (kadm5_modify_principal): don't free the caller's tl_data (oops) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9306 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kadm5/srv/ChangeLog | 5 +++++ src/lib/kadm5/srv/svr_principal.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/lib/kadm5/srv/ChangeLog b/src/lib/kadm5/srv/ChangeLog index 0faa215fc..a0885bf31 100644 --- a/src/lib/kadm5/srv/ChangeLog +++ b/src/lib/kadm5/srv/ChangeLog @@ -1,3 +1,8 @@ +Wed Nov 6 16:22:05 1996 Barry Jaspan + + * svr_principal.c (kadm5_modify_principal): don't free the + caller's tl_data (oops) + Fri Nov 1 13:18:40 1996 Barry Jaspan * svr_principal.c (kadm5_modify_principal): update for new tl_data diff --git a/src/lib/kadm5/srv/svr_principal.c b/src/lib/kadm5/srv/svr_principal.c index 380cf1f74..ecd2d2d3f 100644 --- a/src/lib/kadm5/srv/svr_principal.c +++ b/src/lib/kadm5/srv/svr_principal.c @@ -522,8 +522,13 @@ kadm5_modify_principal(void *server_handle, kdb.n_tl_data = entry->n_tl_data; } - if ((ret = kdb_put_entry(handle, &kdb, &adb))) - goto done; + ret = kdb_put_entry(handle, &kdb, &adb); + if (mask & KADM5_TL_DATA) { + /* prevent kdb_free_entry from freeing the caller's data */ + kdb.tl_data = NULL; + kdb.n_tl_data = 0; + } + if (ret) goto done; ret = KADM5_OK; done: -- 2.26.2