From: Howard Chu Date: Mon, 9 May 2005 01:20:03 +0000 (+0000) Subject: More for error propagation X-Git-Tag: OPENLDAP_AC_BP~691 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f8bba201f4f2dfcf473c63edd21de6465e6b4659;p=openldap More for error propagation --- diff --git a/servers/slapd/back-ldif/ldif.c b/servers/slapd/back-ldif/ldif.c index 57ad89e43b..5ac20b9448 100644 --- a/servers/slapd/back-ldif/ldif.c +++ b/servers/slapd/back-ldif/ldif.c @@ -458,12 +458,14 @@ static int r_enum_tree(enumCookie *ck, struct berval *path, list = ptr->next; - if ( ptr->num.bv_val ) - AC_MEMCPY( ptr->bv.bv_val + ptr->off, ptr->num.bv_val, - ptr->num.bv_len ); - fullpath( path, &ptr->bv, &fpath ); - r_enum_tree(ck, &fpath, &e->e_name, &e->e_nname ); - free(fpath.bv_val); + if ( rc == LDAP_SUCCESS ) { + if ( ptr->num.bv_val ) + AC_MEMCPY( ptr->bv.bv_val + ptr->off, ptr->num.bv_val, + ptr->num.bv_len ); + fullpath( path, &ptr->bv, &fpath ); + rc = r_enum_tree(ck, &fpath, &e->e_name, &e->e_nname ); + free(fpath.bv_val); + } if ( ptr->num.bv_val ) free( ptr->num.bv_val ); free(ptr->bv.bv_val);