Bug#1106605: unblock: openldap/2.6.10+dfsg-1 (pre-approval) (2/2)
From
Ryan Tandy@21:1/5 to
All on Tue May 27 05:20:01 2025
[continued from previous message]
+ nsub++; /* make sure subs[nsub] is freed */
goto cleanup;
}
p = begin - 1;
@@ -165,6 +167,7 @@
continue;
} else {
+ nsub++; /* make sure subs[nsub] is freed */
goto cleanup;
}
@@ -176,10 +179,6 @@
*/
tmps = (struct berval * )realloc( subs, sizeof( struct berval )*( nsub + 1 ) );
if ( tmps == NULL ) {
- /*
- * XXX need to free the value subst stuff!
- */
- free( subs );
goto cleanup;
}
subs = tmps;
@@ -200,6 +199,7 @@
s = calloc( sizeof( struct rewrite_subst ), 1 );
if ( s == NULL ) {
+ nsub++; /* make sure last elements are freed */
goto cleanup;
}
@@ -213,13 +213,13 @@
cleanup:;
if ( subs ) {
for ( l=0; l<nsub; l++ ) {
- free( subs[nsub].bv_val );
+ free( subs[l].bv_val );
}
free( subs );
}
if ( submatch ) {
for ( l=0; l<nsub; l++ ) {
- free( submatch[nsub].ls_map );
+ free( submatch[l].ls_map );
}
free( submatch );
}
diff -Nru openldap-2.6.9+dfsg/servers/lloadd/config.c openldap-2.6.10+dfsg/servers/lloadd/config.c
--- openldap-2.6.9+dfsg/servers/lloadd/config.c 2024-11-26 09:11:04.000000000 -0800
+++ openldap-2.6.10+dfsg/servers/lloadd/config.c 2025-05-22 10:56:21.000000000 -0700
@@ -3767,6 +3767,10 @@
}
#endif /* ! HAVE_TLS */
b->b_tls_conf = tlskey[i].mask;
+ if ( b->b_tls != LLOAD_LDAPS ) {
+ b->b_tls = b->b_tls_conf;
+ flag = LLOAD_BACKEND_MOD_OTHER;
+ }
} break;
case CFG_WEIGHT:
b->b_weight = c->value_uint;
diff -Nru openldap-2.6.9+dfsg/servers/slapd/back-ldif/ldif.c openldap-2.6.10+dfsg/servers/slapd/back-ldif/ldif.c
--- openldap-2.6.9+dfsg/servers/slapd/back-ldif/ldif.c 2024-11-26 09:11:04.000000000 -0800
+++ openldap-2.6.10+dfsg/servers/slapd/back-ldif/ldif.c 2025-05-22 10:56:21.000000000 -0700
@@ -1576,28 +1576,6 @@
goto done;
}
- rc = ndn2path( op, &op->o_req_ndn, &path, 0 );
- if ( rc != LDAP_SUCCESS ) {
- goto done;
- }
-
- ldif2dir_len( path );
- ldif2dir_name( path