]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/filter.c
Unify use of BDB lockers
[openldap] / servers / slapd / filter.c
index c1aa9acbc6be64323212048e0e46e02c9d0968c0..f7b6821482337d12bce556412bbb8b67c2cdd592 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * 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: