mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-01 16:54:30 +03:00
Ensure OpenURL list is always freed
This commit is contained in:
parent
8f9a652774
commit
68e8152f3e
@ -74,19 +74,19 @@ static void ami_openurl_free_list(struct MinList *list)
|
||||
struct ami_protocol *node;
|
||||
struct ami_protocol *nnode;
|
||||
|
||||
if(IsMinListEmpty(list)) return;
|
||||
node = (struct ami_protocol *)GetHead((struct List *)list);
|
||||
if(IsMinListEmpty(list) == NULL) {
|
||||
node = (struct ami_protocol *)GetHead((struct List *)list);
|
||||
|
||||
do
|
||||
{
|
||||
nnode=(struct ami_protocol *)GetSucc((struct Node *)node);
|
||||
|
||||
Remove((struct Node *)node);
|
||||
if (node->protocol) lwc_string_unref(node->protocol);
|
||||
free(node);
|
||||
node = NULL;
|
||||
}while((node=nnode));
|
||||
do
|
||||
{
|
||||
nnode=(struct ami_protocol *)GetSucc((struct Node *)node);
|
||||
|
||||
Remove((struct Node *)node);
|
||||
if (node->protocol) lwc_string_unref(node->protocol);
|
||||
free(node);
|
||||
node = NULL;
|
||||
}while((node=nnode));
|
||||
}
|
||||
free(list);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user