From 68e8152f3eb95395cd47e0d703ed709e4ddaef89 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Wed, 7 Dec 2016 00:00:54 +0000 Subject: Ensure OpenURL list is always freed --- frontends/amiga/launch.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'frontends') 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); } -- cgit v1.2.3