ITS#10349 Free bv_effective if unused

This commit is contained in:
Ondřej Kuzník 2025-06-13 08:01:55 +01:00 committed by Quanah Gibson-Mount
parent 8cf1812431
commit b4ed8cf783

View file

@ -268,7 +268,7 @@ aa_operational( Operation *op, SlapReply *rs )
ch_free( ocp );
if ( atp != NULL ) {
if ( atp != NULL && atp[0] != NULL ) {
BerVarray bv_allowed = NULL,
bv_effective = NULL;
int i, ja = 0, je = 0;
@ -323,8 +323,10 @@ aa_operational( Operation *op, SlapReply *rs )
(*ap)->a_nvals = bv_effective;
(*ap)->a_numvals = je;
ap = &(*ap)->a_next;
bv_effective = NULL;
}
ch_free( bv_effective );
*ap = NULL;
}
@ -409,8 +411,10 @@ done_ce:;
(*ap)->a_nvals = bv_effective;
(*ap)->a_numvals = je;
ap = &(*ap)->a_next;
bv_effective = NULL;
}
ch_free( bv_effective );
*ap = NULL;
}