]> git.sur5r.net Git - openldap/commitdiff
ITS#5939 plug descriptor leak
authorHoward Chu <hyc@openldap.org>
Tue, 10 Feb 2009 20:07:24 +0000 (20:07 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 10 Feb 2009 20:07:24 +0000 (20:07 +0000)
servers/slapd/back-sock/opensock.c

index b2a9943ea143da3ea65fc04f0a9c8ce2d3f9c88a..b02e573370fcca23e798f36f22015ec9b9704d77 100644 (file)
@@ -57,6 +57,7 @@ opensock(
        if ( connect( fd, (struct sockaddr *)&sockun, sizeof(sockun) ) < 0 ) {
                Debug( LDAP_DEBUG_ANY, "socket connect(%s) failed\n",
                        sockpath ? sockpath : "<null>", 0, 0 );
+               close( fd );
                return( NULL );
        }