Fix xsettings list copy
If there is only 1 element in the list or memory allocation fails on the 2nd iteration then new->next is uninitialised.
This commit is contained in:
parent
dcc3dd4c7c
commit
45bfa8e5e7
@ -691,7 +691,11 @@ xsettings_list_copy (XSettingsList *list)
|
|||||||
if (new_iter)
|
if (new_iter)
|
||||||
new_iter->next = new_node;
|
new_iter->next = new_node;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
new = new_node;
|
new = new_node;
|
||||||
|
new->next = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
new_iter = new_node;
|
new_iter = new_node;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user