X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Foverlays%2Fdynlist.c;h=6293889f04ea1682d8c246d8bead8ffe784c05db;hb=59e9ff6243465640956b58ad1756a3ede53eca7c;hp=b5146ed7868262807ce6c25b809ca9ce66f8018b;hpb=fd0bdcb6c68c3eb28281f5ea4a5083be66822972;p=openldap diff --git a/servers/slapd/overlays/dynlist.c b/servers/slapd/overlays/dynlist.c index b5146ed786..6293889f04 100644 --- a/servers/slapd/overlays/dynlist.c +++ b/servers/slapd/overlays/dynlist.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2003-2014 The OpenLDAP Foundation. + * Copyright 2003-2018 The OpenLDAP Foundation. * Portions Copyright 2004-2005 Pierangelo Masarati. * Portions Copyright 2008 Emmanuel Dreyfus. * All rights reserved. @@ -346,7 +346,7 @@ static int dynlist_prepare_entry( Operation *op, SlapReply *rs, dynlist_info_t *dli ) { Attribute *a, *id = NULL; - slap_callback cb; + slap_callback cb = { 0 }; Operation o = *op; struct berval *url; Entry *e; @@ -404,8 +404,6 @@ dynlist_prepare_entry( Operation *op, SlapReply *rs, dynlist_info_t *dli ) dlc.dlc_dli = dli; cb.sc_private = &dlc; cb.sc_response = dynlist_sc_update; - cb.sc_cleanup = NULL; - cb.sc_next = NULL; o.o_callback = &cb; o.ors_deref = LDAP_DEREF_NEVER; @@ -1158,6 +1156,12 @@ done_uri:; filter_free( filter ); } + while ( dlm != NULL ) { + dlml = dlm; + dlm = dlm->dlm_next; + ch_free( dlml ); + } + Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 ); @@ -1174,7 +1178,8 @@ done_uri:; c->argv[ attridx ] ); Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 ); - return 1; + rc = 1; + goto done_uri; } if ( !is_at_subtype( ad->ad_type, slap_schema.si_ad_labeledURI->ad_type ) ) { @@ -1184,7 +1189,8 @@ done_uri:; c->argv[ attridx ] ); Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 ); - return 1; + rc = 1; + goto done_uri; } attridx++; @@ -1213,7 +1219,8 @@ done_uri:; i - 3, c->argv[ i ] ); Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 ); - return 1; + rc = 1; + goto done_uri; } arg = cp + 1; } @@ -1226,7 +1233,8 @@ done_uri:; i - 3, c->argv[ i ] ); Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 ); - return 1; + rc = 1; + goto done_uri; } dlmp = (dynlist_map_t *)ch_calloc( 1, sizeof( dynlist_map_t ) ); @@ -1255,7 +1263,8 @@ done_uri:; c->valx ); Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg, 0 ); - return 1; + rc = 1; + goto done_uri; } dlip = &(*dlip)->dli_next; }