- reported by Heenan, Timothy Steven (cherry picked from commit 7fb8c88c1d4aeb50d1e637697132ab0994dcdb28) (cherry picked from commit 118c901bd1879a46d9e392093994bc544cf511c1)
@@ -824,12 +824,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)
@@ -840,7 +842,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;