From: Tom Yu Date: Fri, 27 Jun 1997 21:38:24 +0000 (+0000) Subject: * keytab.c (add_principal): Don't call kadm5_free_key_data; that's X-Git-Tag: krb5-1.1-beta1~1122 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8d22b935ac7cdf1431caa926ea4a0fd69233531d;p=krb5.git * keytab.c (add_principal): Don't call kadm5_free_key_data; that's Just Wrong here and was causing coredumps. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10102 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kadmin/cli/ChangeLog b/src/kadmin/cli/ChangeLog index 0869c1236..3bf88a682 100644 --- a/src/kadmin/cli/ChangeLog +++ b/src/kadmin/cli/ChangeLog @@ -1,3 +1,8 @@ +Fri Jun 27 17:37:07 1997 Tom Yu + + * keytab.c (add_principal): Don't call kadm5_free_key_data; that's + Just Wrong here and was causing coredumps. + Wed May 28 13:33:40 1997 Barry Jaspan * keytab.c (add_principal): use kadm5_free_key_data diff --git a/src/kadmin/cli/keytab.c b/src/kadmin/cli/keytab.c index 56724491f..df4f6ce25 100644 --- a/src/kadmin/cli/keytab.c +++ b/src/kadmin/cli/keytab.c @@ -255,7 +255,11 @@ int add_principal(void *handle, char *keytab_str, krb5_keytab keytab, } cleanup: - kadm5_free_key_data(handle, &nkeys, &keys); + if (nkeys) { + for (i = 0; i < nkeys; i++) + krb5_free_keyblock_contents(context, &keys[i]); + free(keys); + } if (princ) krb5_free_principal(context, princ);