]> git.sur5r.net Git - openldap/commitdiff
pblock_add_control() needs to call slapi_dup_control()
authorLuke Howard <lukeh@openldap.org>
Thu, 28 Jul 2005 09:48:44 +0000 (09:48 +0000)
committerLuke Howard <lukeh@openldap.org>
Thu, 28 Jul 2005 09:48:44 +0000 (09:48 +0000)
servers/slapd/slapi/slapi_pblock.c

index 077dac1cc800bd10645abf8dbc0b28aea93de371..4d1022a07d72586ae2f17d854e690955cb33acd4 100644 (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 );
 }