diff options
-rw-r--r-- | source3/utils/nmb-agent.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source3/utils/nmb-agent.c b/source3/utils/nmb-agent.c index 61959ba680..8a202d04fa 100644 --- a/source3/utils/nmb-agent.c +++ b/source3/utils/nmb-agent.c @@ -56,19 +56,18 @@ terminate sockent connection ****************************************************************************/ static void sock_redir_free(struct sock_redir *sock) { - close(sock->c); - sock->c = -1; + DEBUG(10,("sock_redir_free: %d\n", sock->c)); + if (sock->c != -1) + { + close(sock->c); + sock->c = -1; + } if (sock->n != NULL) { -#if 0 free(sock->n); -#endif sock->n = NULL; } -#if 0 free(sock); -#endif - ZERO_STRUCTP(sock); } /**************************************************************************** |