pblock_add_control() needs to call slapi_dup_control()

This commit is contained in:
Luke Howard 2005-07-28 09:48:44 +00:00
parent f1e604a3ac
commit f32bfe729f

View File

@ -762,7 +762,7 @@ pblock_add_control( Slapi_PBlock *pb, LDAPControl *control )
controls = (LDAPControl **)slapi_ch_realloc( (char *)controls,
( i + 2 ) * sizeof(LDAPControl *));
controls[i] = control;
controls[i] = slapi_dup_control( control );
return pblock_set_default( pb, SLAPI_RESCONTROLS, (void *)controls );
}