The branch, master has been updated via e0e7ca4... Revert "s4:hdb-samba4 - Don't double-free "db"" via 3493b62... s4:heimdal A real fix for bug 6801 from e33c23d... s3:net: simplify padding to single printf call
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit e0e7ca4ee83dac62f5b1d61a711a852679e0c0a0 Author: Andrew Bartlett <abart...@samba.org> Date: Wed Oct 14 09:10:01 2009 +1100 Revert "s4:hdb-samba4 - Don't double-free "db"" This reverts commit 11a8a54c825a52d7dd6ab78bc7aeff2d719327d2. The actual fix for bug 6801 is in hdb_end_seq_get() - this attempt leaks 'db' instead. Andrew Bartlett commit 3493b62b4b6e2f36f960164c251168b50d9722a3 Author: Andrew Bartlett <abart...@samba.org> Date: Wed Oct 14 09:04:16 2009 +1100 s4:heimdal A real fix for bug 6801 The issue was that we would free the entry after the database, not knowing that the entry was a talloc child of the database. Andrew Bartlett ----------------------------------------------------------------------- Summary of changes: source4/heimdal/lib/hdb/keytab.c | 6 +++--- source4/kdc/hdb-samba4.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/heimdal/lib/hdb/keytab.c b/source4/heimdal/lib/hdb/keytab.c index a557de0..6cab8a4 100644 --- a/source4/heimdal/lib/hdb/keytab.c +++ b/source4/heimdal/lib/hdb/keytab.c @@ -401,12 +401,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; } diff --git a/source4/kdc/hdb-samba4.c b/source4/kdc/hdb-samba4.c index bed6ee9..4062e13 100644 --- a/source4/kdc/hdb-samba4.c +++ b/source4/kdc/hdb-samba4.c @@ -1442,6 +1442,7 @@ static krb5_error_code hdb_samba4_nextkey(krb5_context context, HDB *db, unsigne static krb5_error_code hdb_samba4_destroy(krb5_context context, HDB *db) { + talloc_free(db); return 0; } -- Samba Shared Repository