From e2d4ae15107c8613707adc68ffc68c6ced04e9be Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 7 Aug 2009 17:14:13 +1000 Subject: fixed several places that unnecessarily take a reference to the event context These references were triggering the ambiguous talloc_free errors from the recent talloc changes when the server is run using the 'standard' process model instead of the 'single' process model. I am aiming to move the build farm to use the 'standard' process model soon, as part of an effort to make our test environment better match the real deployment of Samba4. The references are not needed as the way that the event context is used is as the 'top parent', so when the event context is freed then all of the structures that were taking a reference to the event context were actually freed as well, thus making the references redundent. --- source4/nbt_server/wins/winswack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/nbt_server') diff --git a/source4/nbt_server/wins/winswack.c b/source4/nbt_server/wins/winswack.c index c53fa1d069..a58362830a 100644 --- a/source4/nbt_server/wins/winswack.c +++ b/source4/nbt_server/wins/winswack.c @@ -94,7 +94,7 @@ struct composite_context *wins_challenge_send(TALLOC_CTX *mem_ctx, struct wins_c result = talloc_zero(mem_ctx, struct composite_context); if (result == NULL) return NULL; result->state = COMPOSITE_STATE_IN_PROGRESS; - result->event_ctx = talloc_reference(result, io->in.event_ctx); + result->event_ctx = io->in.event_ctx; state = talloc_zero(result, struct wins_challenge_state); if (state == NULL) goto failed; @@ -204,7 +204,7 @@ static struct composite_context *wins_release_demand_send(TALLOC_CTX *mem_ctx, s result = talloc_zero(mem_ctx, struct composite_context); if (result == NULL) return NULL; result->state = COMPOSITE_STATE_IN_PROGRESS; - result->event_ctx = talloc_reference(result, io->in.event_ctx); + result->event_ctx = io->in.event_ctx; state = talloc_zero(result, struct wins_release_demand_state); if (state == NULL) goto failed; -- cgit