summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-12-07 00:00:54 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2016-12-07 00:00:54 +0000
commit68e8152f3eb95395cd47e0d703ed709e4ddaef89 (patch)
tree28c4f6153504479af96249cae8cca2f883dd9a90 /frontends
parent8f9a652774bbf1bdb469e0e7280a28983559b90d (diff)
downloadnetsurf-68e8152f3eb95395cd47e0d703ed709e4ddaef89.tar.gz
netsurf-68e8152f3eb95395cd47e0d703ed709e4ddaef89.tar.bz2
Ensure OpenURL list is always freed
Diffstat (limited to 'frontends')
-rwxr-xr-xfrontends/amiga/launch.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/frontends/amiga/launch.c b/frontends/amiga/launch.c
index 31800ef7a..10c32aeed 100755
--- a/frontends/amiga/launch.c
+++ b/frontends/amiga/launch.c
@@ -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);
-
- do
- {
- nnode=(struct ami_protocol *)GetSucc((struct Node *)node);
+ if(IsMinListEmpty(list) == NULL) {
+ node = (struct ami_protocol *)GetHead((struct List *)list);
- 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);
}