The branch, v3-3-test has been updated via c1fcc41bd96652b175b41421a5f6a9396c75e67f (commit) from 6a561d311496569dd5db0c6d6461ce9c4896f142 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test - Log ----------------------------------------------------------------- commit c1fcc41bd96652b175b41421a5f6a9396c75e67f Author: Qiao Yang <[EMAIL PROTECTED]> Date: Fri Sep 5 14:08:09 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. (cherry picked from commit be6f12273f171a3eb1967d2299064e57d737f6a4) ----------------------------------------------------------------------- Summary of changes: source/winbindd/winbindd.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/winbindd/winbindd.c b/source/winbindd/winbindd.c index f75af64..44b5415 100644 --- a/source/winbindd/winbindd.c +++ b/source/winbindd/winbindd.c @@ -549,7 +549,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), @@ -581,6 +580,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