mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
r19065: No functional change, just a trivial simplification
(This used to be commit 45628f71cfc770b1ba67abf38aac53ac40773cd0)
This commit is contained in:
parent
58b8f72af6
commit
9989649fb4
@ -634,36 +634,36 @@ static void remove_client(struct winbindd_cli_state *state)
|
||||
{
|
||||
/* It's a dead client - hold a funeral */
|
||||
|
||||
if (state != NULL) {
|
||||
|
||||
/* Close socket */
|
||||
|
||||
close(state->sock);
|
||||
|
||||
/* Free any getent state */
|
||||
|
||||
free_getent_state(state->getpwent_state);
|
||||
free_getent_state(state->getgrent_state);
|
||||
|
||||
/* We may have some extra data that was not freed if the
|
||||
client was killed unexpectedly */
|
||||
|
||||
SAFE_FREE(state->response.extra_data.data);
|
||||
|
||||
if (state->mem_ctx != NULL) {
|
||||
talloc_destroy(state->mem_ctx);
|
||||
state->mem_ctx = NULL;
|
||||
}
|
||||
|
||||
remove_fd_event(&state->fd_event);
|
||||
|
||||
/* Remove from list and free */
|
||||
|
||||
winbindd_remove_client(state);
|
||||
TALLOC_FREE(state);
|
||||
if (state == NULL) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Close socket */
|
||||
|
||||
close(state->sock);
|
||||
|
||||
/* Free any getent state */
|
||||
|
||||
free_getent_state(state->getpwent_state);
|
||||
free_getent_state(state->getgrent_state);
|
||||
|
||||
/* We may have some extra data that was not freed if the client was
|
||||
killed unexpectedly */
|
||||
|
||||
SAFE_FREE(state->response.extra_data.data);
|
||||
|
||||
if (state->mem_ctx != NULL) {
|
||||
talloc_destroy(state->mem_ctx);
|
||||
state->mem_ctx = NULL;
|
||||
}
|
||||
|
||||
remove_fd_event(&state->fd_event);
|
||||
|
||||
/* Remove from list and free */
|
||||
|
||||
winbindd_remove_client(state);
|
||||
TALLOC_FREE(state);
|
||||
}
|
||||
|
||||
/* Shutdown client connection which has been idle for the longest time */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user