]> git.sur5r.net Git - openldap/commitdiff
fix test before releasing resources (ITS#3990)
authorPierangelo Masarati <ando@openldap.org>
Wed, 31 Aug 2005 15:11:25 +0000 (15:11 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 31 Aug 2005 15:11:25 +0000 (15:11 +0000)
servers/slapd/back-meta/conn.c

index 6184946c8dab870e7ea6f76f7841bf05d5c8fd8e..a0ae2801249fe69e0b607e747dff707e43900006 100644 (file)
@@ -803,10 +803,7 @@ meta_back_getconn(
                        }
        
                        if ( rs->sr_err != LDAP_SUCCESS ) {
-                               if ( new_conn ) {
-                                       meta_back_freeconn( op, mc );
-
-                               } else {
+                               if ( mc != NULL ) {
                                        meta_back_release_conn( op, mc );
                                }
 
@@ -825,10 +822,7 @@ meta_back_getconn(
 
                if ( newparent && meta_back_get_candidate( op, rs, op->orr_nnewSup ) != i )
                {
-                       if ( new_conn ) {
-                               meta_back_freeconn( op, mc );
-
-                       } else {
+                       if ( mc != NULL ) {
                                meta_back_release_conn( op, mc );
                        }