From d5685734d2eb0e3520d58036a1ee793fce51af81 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Mon, 11 Jul 2005 19:09:30 +0000 Subject: [PATCH] retcode_op_func(): Fix uninitialized variable 'ref': 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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/servers/slapd/overlays/retcode.c b/servers/slapd/overlays/retcode.c index 5c2320ee59..0efa850466 100644 --- a/servers/slapd/overlays/retcode.c +++ b/servers/slapd/overlays/retcode.c @@ -1,5 +1,5 @@ /* retcode.c - customizable response for client testing purposes */ -/* $Header$ */ +/* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * * 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; } -- 2.39.5