barrier (cache->ops)
authorBarry Jaspan <bjaspan@mit.edu>
Sun, 1 Jul 1990 15:28:44 +0000 (15:28 +0000)
committerBarry Jaspan <bjaspan@mit.edu>
Sun, 1 Jul 1990 15:28:44 +0000 (15:28 +0000)
bjaspan: fixed memory leak in seqential scan, unviolated an abstraction

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

src/clients/klist/klist.c

index 4390680ccb6b48613a858a50311f8e0f1d3c1769..b769a4e7921365d11a4f357a697c7e568876d7bf 100644 (file)
@@ -105,7 +105,7 @@ main(argc, argv)
        exit(1);
     }
     printf("Ticket cache: %s\nDefault principal: %s\n",
-          (*cache->ops->get_name)(cache), name);
+          krb5_cc_get_name(cache), name);
     free(name);
     if (code = krb5_cc_start_seq_get(cache, &cur)) {
        com_err(argv[0], code, "while starting to retrieve tickets");
@@ -124,6 +124,8 @@ main(argc, argv)
            continue;
        }
        printf("C: %s\tS:%s\n", name, sname);
+       free(name);
+       free(sname);
     }
     if (code == KRB5_CC_END) {
        if (code = krb5_cc_end_seq_get(cache, &cur)) {