summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-07-24 14:46:43 +0200
committerVolker Lendecke <vl@samba.org>2008-07-24 14:50:22 +0200
commitd7b87cdce289030a9d274e51404ad1a0580b36bd (patch)
tree87b823e863c7323ed2d5f2de2cbe0e8a67d93796 /source3
parentb39237d3b3459d82e7a822518b6ceab47e14e650 (diff)
downloadsamba-d7b87cdce289030a9d274e51404ad1a0580b36bd.tar.gz
samba-d7b87cdce289030a9d274e51404ad1a0580b36bd.tar.bz2
samba-d7b87cdce289030a9d274e51404ad1a0580b36bd.zip
Make use of TALLOC_FREE when freeing the per-winbindrequest memory context
(This used to be commit 9e49d390f79c6afc8b0efd9664e60602aebaa4f2)
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 55ab58f7eb..cb16c765a1 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/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);