Commit df7ed47b authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

sane: Fix use after free in create_item (scan-build).

realloc may free lead_static.
parent f7e76184
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment