From: Simo Sorce Date: Sun, 15 Jun 2008 15:11:14 +0000 (-0400) Subject: Note that making ldb the event context parent seem to lead to races when X-Git-Tag: samba-4.0.0alpha5~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10ffa87b6b7ebfe51e81819feb93a72e9ec10418;p=thirdparty%2Fsamba.git Note that making ldb the event context parent seem to lead to races when freeing up resources. Try to avoid races by making the autofree context be the parent of the event system --- diff --git a/source/lib/ldb/common/ldb.c b/source/lib/ldb/common/ldb.c index 22cd46d13f8..d0570c53821 100644 --- a/source/lib/ldb/common/ldb.c +++ b/source/lib/ldb/common/ldb.c @@ -48,7 +48,7 @@ struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct event_context *ev_ctx) /* FIXME: Hack a new event context so that CMD line utilities work * until we have them all converted */ if (ev_ctx == NULL) { - ev_ctx = event_context_init(ldb); + ev_ctx = event_context_init(talloc_autofree_context()); } ret = ldb_setup_wellknown_attributes(ldb);