ITS#9924 slapo-deref: plug memleak

memory alloc'd by bvarray_dup must be freed by bvarray_free, not regular free.
This commit is contained in:
Howard Chu 2022-09-29 16:02:57 +01:00 committed by Quanah Gibson-Mount
parent a779f148a0
commit e640ce282a

View File

@ -439,7 +439,7 @@ deref_response( Operation *op, SlapReply *rs )
rc = ber_printf( ber, "{O[W]}",
&dr->dr_spec.ds_attributes[ j ]->ad_cname,
dr->dr_vals[ i ].dv_attrVals[ j ] );
op->o_tmpfree( dr->dr_vals[ i ].dv_attrVals[ j ],
ber_bvarray_free_x( dr->dr_vals[ i ].dv_attrVals[ j ],
op->o_tmpmemctx );
}
}