The branch, v3-0-test has been updated via 05a80132ea95f40fdc8d4cfa6f90d8ba472a0272 (commit) from f3d604ab72173c9d51661f3b696b0f25da602226 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test - Log ----------------------------------------------------------------- commit 05a80132ea95f40fdc8d4cfa6f90d8ba472a0272 Author: Qiao Yang <[EMAIL PROTECTED]> Date: Fri Sep 5 14:17:04 2008 +0200 Fix a memleak request.extra_data is not freed if there is no extra_data in response or when there is some error happens in processing. This patch will free the buffer right after processing a request before sending back a response. ----------------------------------------------------------------------- Summary of changes: source/nsswitch/winbindd.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c index 9cf4bea..54081ab 100644 --- a/source/nsswitch/winbindd.c +++ b/source/nsswitch/winbindd.c @@ -477,7 +477,6 @@ static void response_extra_sent(void *private_data, BOOL success) return; } - SAFE_FREE(state->request.extra_data.data); SAFE_FREE(state->response.extra_data.data); setup_async_read(&state->fd_event, &state->request, sizeof(uint32), @@ -512,6 +511,8 @@ static void response_main_sent(void *private_data, BOOL success) static void request_finished(struct winbindd_cli_state *state) { + /* Make sure request.extra_data is freed when finish processing a request */ + SAFE_FREE(state->request.extra_data.data); setup_async_write(&state->fd_event, &state->response, sizeof(state->response), response_main_sent, state); } -- Samba Shared Repository