]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldap/unbind.c
cleanup and better dn handling
[openldap] / servers / slapd / back-ldap / unbind.c
index 80b3981867da1a88903552decd632f19c5eaa7f5..171581df54f73dd10609dee7a0658f1b8ce1855c 100644 (file)
@@ -1,7 +1,7 @@
 /* unbind.c - ldap backend unbind function */
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /* This is an altered version */
@@ -88,8 +88,8 @@ ldap_back_conn_destroy(
                 * in a segmentation fault
                 */
                ldap_unbind(lc->ld);
-               if ( lc->bound_dn ) {
-                       free( lc->bound_dn );
+               if ( lc->bound_dn.bv_val ) {
+                       free( lc->bound_dn.bv_val );
                }
                free( lc );
        }