[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-2988-g72865f5
Volker Lendecke
vlendec at samba.org
Fri Sep 5 12:12:10 GMT 2008
The branch, v3-2-test has been updated
via 72865f5e4ff30861d58b928baaf7be3373301f37 (commit)
from 1558a5c1977b1f87600ec487238fa8db009f41fd (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 72865f5e4ff30861d58b928baaf7be3373301f37
Author: Qiao Yang <geoyang at ironport.com>
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 98d70cc..876b2e8 100644
--- a/source/winbindd/winbindd.c
+++ b/source/winbindd/winbindd.c
@@ -553,7 +553,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),
@@ -588,6 +587,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
More information about the samba-cvs
mailing list