]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-sock/opensock.c
ITS#6024 Don't send cookies without csn.
[openldap] / servers / slapd / back-sock / opensock.c
index e2d4e80e920ca86c4b13236b5cde547ffd403b9e..b02e573370fcca23e798f36f22015ec9b9704d77 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2007-2008 The OpenLDAP Foundation.
+ * Copyright 2007-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -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 );
        }