mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 17:27:18 +00:00
sane: Fix use after free in create_item (scan-build).
realloc may free lead_static.
This commit is contained in:
parent
f7e76184f1
commit
df7ed47b02
|
@ -257,7 +257,7 @@ static int create_item(HDC hdc, const struct option_descriptor *opt,
|
|||
tpl->style=styles;
|
||||
tpl->dwExtendedStyle = 0;
|
||||
if (lead_static)
|
||||
tpl->x = lead_static->x + lead_static->cx + 1;
|
||||
tpl->x = rc->x + rc->cx + 1;
|
||||
else if (opt->type == TYPE_GROUP)
|
||||
tpl->x = 2;
|
||||
else
|
||||
|
@ -274,7 +274,7 @@ static int create_item(HDC hdc, const struct option_descriptor *opt,
|
|||
else
|
||||
{
|
||||
if (lead_static)
|
||||
tpl->cy = lead_static->cy;
|
||||
tpl->cy = rc->cy;
|
||||
else
|
||||
tpl->cy = 15;
|
||||
|
||||
|
|
Loading…
Reference in a new issue