From: Hallvard Furuseth Date: Mon, 7 Jan 2008 18:50:54 +0000 (+0000) Subject: Avoid use of uninitialized variable 'e' after failed overlay_entry_get_ov(). X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~251 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8a1f904ed9fd5f8bbec628b87691d9f5ce4e5e02;p=openldap Avoid use of uninitialized variable 'e' after failed overlay_entry_get_ov(). (It was harmless unless the value was a trap representation.) --- diff --git a/servers/slapd/overlays/translucent.c b/servers/slapd/overlays/translucent.c index 27715316d1..3fadbbf6b1 100644 --- a/servers/slapd/overlays/translucent.c +++ b/servers/slapd/overlays/translucent.c @@ -605,7 +605,7 @@ static int translucent_compare(Operation *op, SlapReply *rs) { ** */ rc = overlay_entry_get_ov(op, &op->o_req_ndn, NULL, ava->aa_desc, 0, &e, on); - if(e && rc == LDAP_SUCCESS) { + if(rc == LDAP_SUCCESS && e) { overlay_entry_release_ov(op, e, 0, on); return(SLAP_CB_CONTINUE); }