* keytab.c (add_principal): use kadm5_free_key_data
authorBarry Jaspan <bjaspan@mit.edu>
Wed, 28 May 1997 17:34:09 +0000 (17:34 +0000)
committerBarry Jaspan <bjaspan@mit.edu>
Wed, 28 May 1997 17:34:09 +0000 (17:34 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10088 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/cli/ChangeLog
src/kadmin/cli/keytab.c

index 2847e9fee39efcfa7fe1712476700e9f72ab0251..0869c123659eaf1ca2f6f3323392f686984b13ac 100644 (file)
@@ -1,3 +1,7 @@
+Wed May 28 13:33:40 1997  Barry Jaspan  <bjaspan@mit.edu>
+
+       * keytab.c (add_principal): use kadm5_free_key_data
+
 Tue Feb  4 20:56:47 1997  Tom Yu  <tlyu@mit.edu>
 
        * Makefile.in:
index df4f6ce257cd15f2eb1d22a22613d0303ac51f82..56724491f04b3204b1e3535d73fe4cfd037e8c99 100644 (file)
@@ -255,11 +255,7 @@ int add_principal(void *handle, char *keytab_str, krb5_keytab keytab,
      }
 
 cleanup:
-     if (nkeys) {
-         for (i = 0; i < nkeys; i++)
-              krb5_free_keyblock_contents(context, &keys[i]);
-         free(keys);
-     }
+     kadm5_free_key_data(handle, &nkeys, &keys);
      if (princ)
          krb5_free_principal(context, princ);