From 9989649fb47cba43b50465b77f62418b278bd127 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 4 Oct 2006 16:18:36 +0000 Subject: r19065: No functional change, just a trivial simplification (This used to be commit 45628f71cfc770b1ba67abf38aac53ac40773cd0) --- source3/nsswitch/winbindd.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'source3') 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) -- cgit