Commit f02f39f6 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

twain_32/tests: Don't leak memory on an error path (Smatch).

parent 3415f778
...@@ -87,7 +87,10 @@ static TW_HANDLE alloc_and_set_onevalue(TW_UINT32 val, TW_UINT16 type) ...@@ -87,7 +87,10 @@ static TW_HANDLE alloc_and_set_onevalue(TW_UINT32 val, TW_UINT16 type)
GlobalUnlock(hcontainer); GlobalUnlock(hcontainer);
} }
else else
{
GlobalFree(hcontainer);
hcontainer = 0; hcontainer = 0;
}
} }
return hcontainer; return hcontainer;
} }
......
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