diff options
author | Luke Leighton <lkcl@samba.org> | 1999-12-04 20:29:03 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-12-04 20:29:03 +0000 |
commit | 45032218520e2cc8763a84e900b9738417b9cdd5 (patch) | |
tree | c80ee889947b72a265b348df26a3dd7a097c174f | |
parent | 409798953d16ea254ca1b1615648b7e12818fa64 (diff) | |
download | samba-45032218520e2cc8763a84e900b9738417b9cdd5.tar.gz samba-45032218520e2cc8763a84e900b9738417b9cdd5.tar.bz2 samba-45032218520e2cc8763a84e900b9738417b9cdd5.zip |
nmb agent memory free problems
(This used to be commit b4306cbf06f70dd9d2760bb005e15059d6f904f0)
-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); } /**************************************************************************** |