X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Ffilter.c;h=f7b6821482337d12bce556412bbb8b67c2cdd592;hb=e48f72c1b5a7ce571c7ced749aed473d20b32526;hp=c1aa9acbc6be64323212048e0e46e02c9d0968c0;hpb=03dbc30deb6c0d68f37f68a22fb46442d687b654;p=openldap diff --git a/servers/slapd/filter.c b/servers/slapd/filter.c index c1aa9acbc6..f7b6821482 100644 --- a/servers/slapd/filter.c +++ b/servers/slapd/filter.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2006 The OpenLDAP Foundation. + * Copyright 1998-2007 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1001,7 +1001,7 @@ get_simple_vrFilter( } if ( err == LDAP_SUCCESS ) { - *filt = ch_malloc( sizeof vrf ); + *filt = op->o_tmpalloc( sizeof vrf, op->o_tmpmemctx ); **filt = vrf; } @@ -1170,13 +1170,14 @@ simple_vrFilter2bv( Operation *op, ValuesReturnFilter *vrf, struct berval *fstr { struct berval tmp; ber_len_t len; + int undef; if ( vrf == NULL ) { ber_str2bv_x( "No filter!", STRLENOF("No filter!"), 1, fstr, op->o_tmpmemctx ); return; } - int undef = vrf->vrf_choice & SLAPD_FILTER_UNDEFINED; + undef = vrf->vrf_choice & SLAPD_FILTER_UNDEFINED; switch ( vrf->vrf_choice & SLAPD_FILTER_MASK ) { case LDAP_FILTER_EQUALITY: