From 8af9389f87e25aea721071516cf00ed13360ab9c Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Tue, 21 Feb 2006 05:21:19 +0000 Subject: Fix a potential core dump when merging aliases. Might fix bug #15818. Revert intermediate file free code. Suppress some warnings in VMS builds. --- variable.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'variable.c') diff --git a/variable.c b/variable.c index 39f0ada..54bbc02 100644 --- a/variable.c +++ b/variable.c @@ -674,16 +674,17 @@ merge_variable_set_lists (struct variable_set_list **setlist0, /* This loop relies on the fact that all setlists terminate with the global setlist (before NULL). If that's not true, arguably we SHOULD die. */ - while (setlist1 != &global_setlist && to != &global_setlist) - { - struct variable_set_list *from = setlist1; - setlist1 = setlist1->next; + if (to) + while (setlist1 != &global_setlist && to != &global_setlist) + { + struct variable_set_list *from = setlist1; + setlist1 = setlist1->next; - merge_variable_sets (to->set, from->set); + merge_variable_sets (to->set, from->set); - last0 = to; - to = to->next; - } + last0 = to; + to = to->next; + } if (setlist1 != &global_setlist) { -- cgit v1.2.3