mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-04 10:14:29 +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 *node;
|
||||||
struct ami_protocol *nnode;
|
struct ami_protocol *nnode;
|
||||||
|
|
||||||
if(IsMinListEmpty(list)) return;
|
if(IsMinListEmpty(list) == NULL) {
|
||||||
node = (struct ami_protocol *)GetHead((struct List *)list);
|
node = (struct ami_protocol *)GetHead((struct List *)list);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
nnode=(struct ami_protocol *)GetSucc((struct Node *)node);
|
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));
|
|
||||||
|
|
||||||
|
Remove((struct Node *)node);
|
||||||
|
if (node->protocol) lwc_string_unref(node->protocol);
|
||||||
|
free(node);
|
||||||
|
node = NULL;
|
||||||
|
}while((node=nnode));
|
||||||
|
}
|
||||||
free(list);
|
free(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user