summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch/winbindd.c')
-rw-r--r--source3/nsswitch/winbindd.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 8d5a7042c6..6e61df99f1 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -634,37 +634,37 @@ static void remove_client(struct winbindd_cli_state *state)
{
/* It's a dead client - hold a funeral */
- if (state != NULL) {
+ if (state == NULL) {
+ return;
+ }
- /* Close socket */
+ /* Close socket */
- close(state->sock);
+ close(state->sock);
- /* Free any getent state */
+ /* Free any getent state */
- free_getent_state(state->getpwent_state);
- free_getent_state(state->getgrent_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 */
+ /* We may have some extra data that was not freed if the client was
+ killed unexpectedly */
- SAFE_FREE(state->response.extra_data.data);
+ SAFE_FREE(state->response.extra_data.data);
- if (state->mem_ctx != NULL) {
- talloc_destroy(state->mem_ctx);
- state->mem_ctx = NULL;
- }
+ if (state->mem_ctx != NULL) {
+ talloc_destroy(state->mem_ctx);
+ state->mem_ctx = NULL;
+ }
- remove_fd_event(&state->fd_event);
+ remove_fd_event(&state->fd_event);
- /* Remove from list and free */
+ /* Remove from list and free */
- winbindd_remove_client(state);
- TALLOC_FREE(state);
- }
+ winbindd_remove_client(state);
+ TALLOC_FREE(state);
}
-
/* Shutdown client connection which has been idle for the longest time */
static BOOL remove_idle_client(void)