- reported by Heenan, Timothy Steven
@@ -846,12 +846,14 @@ int ds_destroy_list(void)
void destroy_list(int list_id)
{
ds_set_t *sp = NULL;
+ ds_set_t *sp1 = NULL;
ds_dest_t *dest = NULL;
sp = ds_lists[list_id];
while(sp)
+ sp1 = sp->next;
for(dest = sp->dlist; dest!= NULL; dest=dest->next)
if(dest->uri.s!=NULL)
@@ -862,7 +864,8 @@ void destroy_list(int list_id)
}
if (sp->dlist != NULL)
shm_free(sp->dlist);
- sp = sp->next;
+ shm_free(sp);
+ sp = sp1;
ds_lists[list_id] = NULL;