]> git.sur5r.net Git - openldap/commitdiff
Zero new superior before calling pblock_set_dn()
authorLuke Howard <lukeh@openldap.org>
Wed, 27 Jul 2005 09:26:42 +0000 (09:26 +0000)
committerLuke Howard <lukeh@openldap.org>
Wed, 27 Jul 2005 09:26:42 +0000 (09:26 +0000)
servers/slapd/slapi/slapi_pblock.c

index 1f1e038f46b4a03b8ac4773cbe60e134e010989e..1d6b4c06c2104b583d523f252779301d075a6692 100644 (file)
@@ -912,20 +912,24 @@ pblock_set( Slapi_PBlock *pb, int param, void *value )
                        if ( value == NULL ) {
                                if ( pb->pb_op->orr_newSup != NULL ) {
                                        pb->pb_op->o_tmpfree( pb->pb_op->orr_newSup, pb->pb_op->o_tmpmemctx );
+                                       BER_BVZERO( pb->pb_op->orr_newSup );
                                        pb->pb_op->orr_newSup = NULL;
                                }
                                if ( pb->pb_op->orr_newSup != NULL ) {
                                        pb->pb_op->o_tmpfree( pb->pb_op->orr_nnewSup, pb->pb_op->o_tmpmemctx );
+                                       BER_BVZERO( pb->pb_op->orr_nnewSup );
                                        pb->pb_op->orr_nnewSup = NULL;
                                }
                        } else {
                                if ( pb->pb_op->orr_newSup == NULL ) {
                                        pb->pb_op->orr_newSup = (struct berval *)pb->pb_op->o_tmpalloc(
                                                sizeof(struct berval), pb->pb_op->o_tmpmemctx );
+                                       BER_BVZERO( pb->pb_op->orr_newSup );
                                }
                                if ( pb->pb_op->orr_nnewSup == NULL ) {
                                        pb->pb_op->orr_nnewSup = (struct berval *)pb->pb_op->o_tmpalloc(
                                                sizeof(struct berval), pb->pb_op->o_tmpmemctx );
+                                       BER_BVZERO( pb->pb_op->orr_nnewSup );
                                }
                                rc = pblock_set_dn( value, pb->pb_op->orr_newSup, pb->pb_op->orr_nnewSup, pb->pb_op->o_tmpmemctx );
                        }