From: Kurt Zeilenga Date: Fri, 14 Mar 2003 17:45:06 +0000 (+0000) Subject: Plug some memory leaks and prepare for release. X-Git-Tag: OPENLDAP_REL_ENG_2_1_16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b3bb050b69468def6d3c8877962b31ec59da763;p=thirdparty%2Fopenldap.git Plug some memory leaks and prepare for release. --- diff --git a/CHANGES b/CHANGES index fbfb7aa844..6650936cdf 100644 --- a/CHANGES +++ b/CHANGES @@ -1,13 +1,14 @@ OpenLDAP 2.1 Change Log -OpenLDAP 2.1.16 Engineering - Fixed slapd modify mem leak +OpenLDAP 2.1.16 Release + Fixed slapd sasl internal search "auth" issue Fixed liblber BER decoding bug (ITS#2365) Fixed slurpd TLS failure handling (ITS#2253) - Fixed slapd sasl internal search "auth" issue Fixed back-meta NULL deref bug (ITS#2359) Fixed back-ldap memory corruption (ITS#2362) - Updated back-perl + Fixed back-bdb IDL cache leak (ITS#2367) + Fixed slapd index large db files bug (ITS#2368) + Updated back-perl (ITS#2356) Removed ldaptcl from distribution Removed lint Build Environment diff --git a/build/version.sh b/build/version.sh index d16da8a2f1..41df12f487 100755 --- a/build/version.sh +++ b/build/version.sh @@ -7,10 +7,10 @@ ol_package=OpenLDAP ol_major=2 ol_minor=1 -ol_patch=X -ol_api_inc=20115 -ol_api_lib=2:115:0 -ol_release_date="03-09-2003" +ol_patch=16 +ol_api_inc=20116 +ol_api_lib=2:116:0 +ol_release_date="03-15-2003" if test $ol_patch != X ; then ol_version=${ol_major}.${ol_minor}.${ol_patch} diff --git a/servers/slapd/mr.c b/servers/slapd/mr.c index ad00a1ece3..f432c83ca8 100644 --- a/servers/slapd/mr.c +++ b/servers/slapd/mr.c @@ -84,6 +84,7 @@ mr_destroy( void ) m = LDAP_SLIST_FIRST(&mr_list); LDAP_SLIST_REMOVE_HEAD(&mr_list, smr_next); ch_free( m->smr_str.bv_val ); + ch_free( m->smr_compat_syntaxes ); ldap_matchingrule_free((LDAPMatchingRule *)m); } } diff --git a/servers/slapd/root_dse.c b/servers/slapd/root_dse.c index 8e9fb01ab1..9cddfa5e9c 100644 --- a/servers/slapd/root_dse.c +++ b/servers/slapd/root_dse.c @@ -226,6 +226,7 @@ int read_root_dse_file( const char *fname ) Debug( LDAP_DEBUG_ANY, "read_root_dse_file: SLAP_CALLOC failed", 0, 0, 0 ); #endif + fclose( fp ); return LDAP_OTHER; } usr_attr->e_attrs = NULL; @@ -237,9 +238,8 @@ int read_root_dse_file( const char *fname ) if( e == NULL ) { fprintf( stderr, "root_dse: could not parse entry (line=%d)\n", lineno ); - entry_free( usr_attr ); - usr_attr = NULL; - return EXIT_FAILURE; + rc = EXIT_FAILURE; + break; } /* make sure the DN is the empty DN */ @@ -248,9 +248,8 @@ int read_root_dse_file( const char *fname ) "root_dse: invalid rootDSE - dn=\"%s\" (line=%d)\n", e->e_dn, lineno ); entry_free( e ); - entry_free( usr_attr ); - usr_attr = NULL; - return EXIT_FAILURE; + rc = EXIT_FAILURE; + break; } /* @@ -260,15 +259,25 @@ int read_root_dse_file( const char *fname ) */ for(a = e->e_attrs; a != NULL; a = a->a_next) { - if( attr_merge( usr_attr, a->a_desc, a->a_vals ) ) - return LDAP_OTHER; + if( attr_merge( usr_attr, a->a_desc, a->a_vals ) ) { + rc = LDAP_OTHER; + break; + } } entry_free( e ); + if (rc) break; + } + + if (rc) { + entry_free( usr_attr ); + usr_attr = NULL; } ch_free( buf ); + fclose( fp ); + Debug(LDAP_DEBUG_CONFIG, "rootDSE file %s read.\n", fname, 0, 0); return rc; }