From: Pierangelo Masarati Date: Wed, 31 Aug 2005 15:11:25 +0000 (+0000) Subject: fix test before releasing resources (ITS#3990) X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~526 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4ba83103d9a96deddf029ebbc7f18a0d07006309;p=openldap fix test before releasing resources (ITS#3990) --- diff --git a/servers/slapd/back-meta/conn.c b/servers/slapd/back-meta/conn.c index 6184946c8d..a0ae280124 100644 --- a/servers/slapd/back-meta/conn.c +++ b/servers/slapd/back-meta/conn.c @@ -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 ); }