diff --git a/lib/hdb/keytab.c b/lib/hdb/keytab.c index 7fef714c7..925ff67c5 100644 --- a/lib/hdb/keytab.c +++ b/lib/hdb/keytab.c @@ -398,12 +398,12 @@ hdb_end_seq_get(krb5_context context, { struct hdb_cursor *c = cursor->data; - (c->db->hdb_close)(context, c->db); - (c->db->hdb_destroy)(context, c->db); - if (!c->next) hdb_free_entry(context, &c->hdb_entry); + (c->db->hdb_close)(context, c->db); + (c->db->hdb_destroy)(context, c->db); + free(c); return 0; }