]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/referral.c
add referral check to functions elaborated by overlays
[openldap] / servers / slapd / back-ldbm / referral.c
index 6aedb91e5f294a2ebd11b881e98dd0ce50c28b0d..4a9b7b2f1a562a938e814031f4b13da42450293b 100644 (file)
@@ -1,8 +1,17 @@
 /* referral.c - LDBM backend referral handler */
 /* $OpenLDAP$ */
-/*
- * Copyright 2000-2003 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1998-2004 The OpenLDAP Foundation.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
  */
 
 #include "portable.h"
@@ -79,6 +88,8 @@ ldbm_back_referrals(
                }
 
                if ( rs->sr_matched ) free( (char *)rs->sr_matched );
+               rs->sr_ref = NULL;
+               rs->sr_matched = NULL;
                return rs->sr_err;
        }
 
@@ -111,6 +122,8 @@ ldbm_back_referrals(
                }
 
                if( refs != NULL ) ber_bvarray_free( refs );
+               rs->sr_ref = NULL;
+               rs->sr_matched = NULL;
        }
 
        cache_return_entry_r( &li->li_cache, e );