]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-sql/bind.c
fix several schema checking issues; add rename specific statement for entry renaming...
[openldap] / servers / slapd / back-sql / bind.c
index 3ce75c1f08add6db532491bae69e0fb4cc1961e4..5817d06af60eaaa9b1fc0dea4fd214ef3385a267 100644 (file)
@@ -34,7 +34,7 @@ backsql_bind( Operation *op, SlapReply *rs )
        SQLHDBC                 dbh = SQL_NULL_HDBC;
        Entry                   e = { 0 };
        Attribute               *a;
-       backsql_srch_info       bsi;
+       backsql_srch_info       bsi = { 0 };
        AttributeName           anlist[2];
        int                     rc;
  
@@ -101,10 +101,12 @@ backsql_bind( Operation *op, SlapReply *rs )
        }
 
 error_return:;
-       (void)backsql_free_entryID( op, &bsi.bsi_base_id, 0 );
+       if ( !BER_BVISNULL( &bsi.bsi_base_id.eid_ndn ) ) {
+               (void)backsql_free_entryID( op, &bsi.bsi_base_id, 0 );
+       }
 
-       if ( bsi.bsi_e ) {
-               entry_clean( bsi.bsi_e );
+       if ( !BER_BVISNULL( &e.e_nname ) ) {
+               entry_clean( &e );
        }
 
        if ( bsi.bsi_attrs != NULL ) {