Skip to content
Snippets Groups Projects
Commit fa654ae4 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

fix ITS#1660 (issue 1)

parent 50baa901
No related branches found
No related tags found
No related merge requests found
...@@ -539,7 +539,7 @@ long connection_init( ...@@ -539,7 +539,7 @@ long connection_init(
#else #else
Debug( LDAP_DEBUG_ANY, Debug( LDAP_DEBUG_ANY,
"connection_init(%d, %s): set nonblocking failed\n", "connection_init(%d, %s): set nonblocking failed\n",
s, c->c_peer_name, 0 ); s, c->c_peer_name.bv_val, 0 );
#endif #endif
} }
...@@ -653,15 +653,17 @@ connection_destroy( Connection *c ) ...@@ -653,15 +653,17 @@ connection_destroy( Connection *c )
} }
c->c_peer_domain.bv_len = 0; c->c_peer_domain.bv_len = 0;
if(c->c_peer_name.bv_val != NULL) { if(c->c_peer_name.bv_val != NULL) {
#ifdef LDAP_PF_lOCAL #ifdef LDAP_PF_LOCAL
/* /*
* If peer was a domain socket, unlink. Mind you, * If peer was a domain socket, unlink. Mind you,
* they may be un-named. Should we leave this to * they may be un-named. Should we leave this to
* the client? * the client?
*/ */
if (strncmp(c->c_peer_name.bv_val, "PATH=", 5) == 0) { if (strncmp(c->c_peer_name.bv_val, "PATH=",
char *path = c->c_peer_name.bv_val + 5; sizeof("PATH=") - 1) == 0) {
if (path != '\0') { char *path = c->c_peer_name.bv_val
+ sizeof("PATH=") - 1;
if (path[0] != '\0') {
(void)unlink(path); (void)unlink(path);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment