From: Volker Lendecke Date: Thu, 24 Jul 2008 12:46:43 +0000 (+0200) Subject: Make use of TALLOC_FREE when freeing the per-winbindrequest memory context X-Git-Tag: samba-3.3.0pre1~409^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e49d390f79c6afc8b0efd9664e60602aebaa4f2;p=thirdparty%2Fsamba.git Make use of TALLOC_FREE when freeing the per-winbindrequest memory context --- diff --git a/source/winbindd/winbindd.c b/source/winbindd/winbindd.c index 55ab58f7ebb..cb16c765a11 100644 --- a/source/winbindd/winbindd.c +++ b/source/winbindd/winbindd.c @@ -546,10 +546,7 @@ static void response_extra_sent(void *private_data, bool success) struct winbindd_cli_state *state = talloc_get_type_abort(private_data, struct winbindd_cli_state); - if (state->mem_ctx != NULL) { - talloc_destroy(state->mem_ctx); - state->mem_ctx = NULL; - } + TALLOC_FREE(state->mem_ctx); if (!success) { state->finished = True; @@ -574,10 +571,7 @@ static void response_main_sent(void *private_data, bool success) } if (state->response.length == sizeof(state->response)) { - if (state->mem_ctx != NULL) { - talloc_destroy(state->mem_ctx); - state->mem_ctx = NULL; - } + TALLOC_FREE(state->mem_ctx); setup_async_read(&state->fd_event, &state->request, sizeof(uint32), request_len_recv, state); @@ -767,10 +761,7 @@ static void remove_client(struct winbindd_cli_state *state) SAFE_FREE(state->response.extra_data.data); - if (state->mem_ctx != NULL) { - talloc_destroy(state->mem_ctx); - state->mem_ctx = NULL; - } + TALLOC_FREE(state->mem_ctx); remove_fd_event(&state->fd_event);