add missing braces
authorJohn Kohl <jtkohl@mit.edu>
Tue, 8 May 1990 13:43:26 +0000 (13:43 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Tue, 8 May 1990 13:43:26 +0000 (13:43 +0000)
fix arg to copy_keyblock
free the entry

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@779 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/keytab/read_servi.c

index 8ecbae94dce26aa6ef9ff2b444b333168b30bdd9..a7ccfb7ff45f712048608698a9a844dbf376909c 100644 (file)
@@ -57,11 +57,11 @@ OLDDECLARG(krb5_keyblock **, key)
     /*
      * Get the name of the file that we should use. 
      */
-    if (keyprocarg == NULL)
+    if (keyprocarg == NULL) {
        if ((kerror = krb5_kt_default_name((char *)keytabname, 
                                           sizeof(keytabname) - 1))!= KSUCCESS)
            return (kerror);
-    else {
+    else {
        bzero(keytabname, sizeof(keytabname));
        (void) strncpy(keytabname, (char *)keyprocarg, 
                       sizeof(keytabname) - 1);
@@ -85,10 +85,9 @@ OLDDECLARG(krb5_keyblock **, key)
     if ((*key = (krb5_keyblock *)malloc(sizeof(krb5_keyblock))) == NULL)
        return (ENOMEM);        /* XXX */
 
-    krb5_copy_keyblock(entry.key, *key);
+    krb5_copy_keyblock(&entry.key, *key);
 
-    /* Zero the memory containing the key */
-    bzero((char *)&entry, sizeof(krb5_keytab_entry));
+    krb5_kt_free_entry(&entry);
 
     return (KSUCCESS);
 }