Skip to content
Snippets Groups Projects
Commit 1b98cd62 authored by Howard Chu's avatar Howard Chu
Browse files

Fix SLAPI_ADD_RESCONTROLS

parent 4a8bb399
No related branches found
No related tags found
No related merge requests found
......@@ -321,8 +321,13 @@ set( Slapi_PBlock *pb, int param, void *val )
LDAPControl **ctrls = pb->curVals[i];
int j;
for (j=0; ctrls[j]; j++);
ctrls = ch_realloc( ctrls, (j+2)*sizeof(LDAPControl *) );
if ( ctrls ) {
for (j=0; ctrls[j]; j++);
ctrls = ch_realloc( ctrls, (j+2)*sizeof(LDAPControl *) );
} else {
ctrls = ch_malloc( 2 * sizeof(LDAPControl *) );
j = 0;
}
ctrls[j] = val;
ctrls[j+1] = NULL;
pb->curVals[i] = ctrls;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment