(do_list): make sure list of keys is NULL terminated; similar to patch
authorJohan Danielsson <joda@pdc.kth.se>
Mon, 18 Jun 2001 01:24:29 +0000 (01:24 +0000)
committerJohan Danielsson <joda@pdc.kth.se>
Mon, 18 Jun 2001 01:24:29 +0000 (01:24 +0000)
sent by Chris Chiappa

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10086 ec53bebd-3082-4978-b11e-865c3cabbd6b

admin/list.c

index 8af146a27f3558f2e71d364aa00c058a488056e1..4608ebf7aff54720e1df8e5f75bbf008b3ffff31 100644 (file)
@@ -122,11 +122,11 @@ do_list(const char *keytab_string)
                         ((unsigned char*)entry.keyblock.keyvalue.data)[i]);
            CHECK_MAX(key);
        }
-       kp->next = NULL;
        *kie = kp;
        kie = &kp->next;
        krb5_kt_free_entry(context, &entry);
     }
+    *kie = NULL; /* termiate list */
     ret = krb5_kt_end_seq_get(context, keytab, &cursor);
 
     printf("%-*s  %-*s  %-*s", max_version, "Vno",