From: Jong Hyuk Choi Date: Wed, 10 Nov 2004 21:38:41 +0000 (+0000) Subject: fix slap_sl_free() calls in pre / post read controls X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~346 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=62febe5dff17dad6e59402a01d32a161e33b54f7;p=openldap fix slap_sl_free() calls in pre / post read controls --- diff --git a/servers/slapd/back-bdb/add.c b/servers/slapd/back-bdb/add.c index 07b8265283..2c3826d0c7 100644 --- a/servers/slapd/back-bdb/add.c +++ b/servers/slapd/back-bdb/add.c @@ -469,8 +469,8 @@ done: } if( postread_ctrl != NULL ) { - slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx ); - slap_sl_free( *postread_ctrl, &op->o_tmpmemctx ); + slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx ); + slap_sl_free( *postread_ctrl, op->o_tmpmemctx ); } return rs->sr_err; } diff --git a/servers/slapd/back-bdb/delete.c b/servers/slapd/back-bdb/delete.c index 6e54172f57..701ff22ec9 100644 --- a/servers/slapd/back-bdb/delete.c +++ b/servers/slapd/back-bdb/delete.c @@ -595,8 +595,8 @@ done: slap_sl_free( ctxcsn_ndn.bv_val, op->o_tmpmemctx ); if( preread_ctrl != NULL ) { - slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx ); - slap_sl_free( *preread_ctrl, &op->o_tmpmemctx ); + slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx ); + slap_sl_free( *preread_ctrl, op->o_tmpmemctx ); } return rs->sr_err; } diff --git a/servers/slapd/back-bdb/modify.c b/servers/slapd/back-bdb/modify.c index fe613d1dbd..0df677600f 100644 --- a/servers/slapd/back-bdb/modify.c +++ b/servers/slapd/back-bdb/modify.c @@ -662,12 +662,12 @@ done: } if( preread_ctrl != NULL ) { - slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx ); - slap_sl_free( *preread_ctrl, &op->o_tmpmemctx ); + slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx ); + slap_sl_free( *preread_ctrl, op->o_tmpmemctx ); } if( postread_ctrl != NULL ) { - slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx ); - slap_sl_free( *postread_ctrl, &op->o_tmpmemctx ); + slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx ); + slap_sl_free( *postread_ctrl, op->o_tmpmemctx ); } return rs->sr_err; } diff --git a/servers/slapd/back-bdb/modrdn.c b/servers/slapd/back-bdb/modrdn.c index 042311b00f..82f48c4210 100644 --- a/servers/slapd/back-bdb/modrdn.c +++ b/servers/slapd/back-bdb/modrdn.c @@ -949,12 +949,12 @@ done: } if( preread_ctrl != NULL ) { - slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx ); - slap_sl_free( *preread_ctrl, &op->o_tmpmemctx ); + slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx ); + slap_sl_free( *preread_ctrl, op->o_tmpmemctx ); } if( postread_ctrl != NULL ) { - slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx ); - slap_sl_free( *postread_ctrl, &op->o_tmpmemctx ); + slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx ); + slap_sl_free( *postread_ctrl, op->o_tmpmemctx ); } return rs->sr_err; } diff --git a/servers/slapd/result.c b/servers/slapd/result.c index f2ef04cb35..9a05fb06a5 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -1510,7 +1510,7 @@ int slap_read_controls( *ctrl = (LDAPControl *) slap_sl_calloc( 1, sizeof(LDAPControl), NULL ); } else { /* retry: free previous try */ - slap_sl_free( (*ctrl)->ldctl_value.bv_val, &op->o_tmpmemctx ); + slap_sl_free( (*ctrl)->ldctl_value.bv_val, op->o_tmpmemctx ); } **ctrl = c;