]> git.sur5r.net Git - openldap/commitdiff
retcode_op_func(): Fix uninitialized variable 'ref':
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 11 Jul 2005 19:09:30 +0000 (19:09 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 11 Jul 2005 19:09:30 +0000 (19:09 +0000)
Under rs->sr_err == LDAP_REFERRAL, return LDAP_OTHER "bad referral
object" if both rdi->rdi_ref and default_referral are NULL.

servers/slapd/overlays/retcode.c

index 5c2320ee59c3cfe611a73f48c369897da16e4867..0efa850466eafc36242cb29f6fa4e6f1ae25d630 100644 (file)
@@ -1,5 +1,5 @@
 /* retcode.c - customizable response for client testing purposes */
-/* $Header$ */
+/* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
  * Copyright 2005 The OpenLDAP Foundation.
@@ -360,8 +360,7 @@ retcode_op_func( Operation *op, SlapReply *rs )
 
                        if ( rdi->rdi_ref != NULL ) {
                                ref = rdi->rdi_ref;
-
-                       } else if ( default_referral != NULL ) {
+                       } else {
                                ref = default_referral;
                        }