From 45032218520e2cc8763a84e900b9738417b9cdd5 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Sat, 4 Dec 1999 20:29:03 +0000 Subject: nmb agent memory free problems (This used to be commit b4306cbf06f70dd9d2760bb005e15059d6f904f0) --- source3/utils/nmb-agent.c | 13 ++++++------- 1 file 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); } /**************************************************************************** -- cgit