riched20: Fix a memory leak on error path (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8dd3f7d8c4
commit
91ed2a81c1
|
@ -1268,12 +1268,10 @@ static void ME_RTFReadShpPictGroup( RTF_Info *info )
|
|||
static DWORD read_hex_data( RTF_Info *info, BYTE **out )
|
||||
{
|
||||
DWORD read = 0, size = 1024;
|
||||
BYTE *buf = HeapAlloc( GetProcessHeap(), 0, size );
|
||||
BYTE val;
|
||||
BYTE *buf, val;
|
||||
BOOL flip;
|
||||
|
||||
*out = NULL;
|
||||
if (!buf) return 0;
|
||||
|
||||
if (info->rtfClass != rtfText)
|
||||
{
|
||||
|
@ -1281,6 +1279,9 @@ static DWORD read_hex_data( RTF_Info *info, BYTE **out )
|
|||
return 0;
|
||||
}
|
||||
|
||||
buf = HeapAlloc( GetProcessHeap(), 0, size );
|
||||
if (!buf) return 0;
|
||||
|
||||
val = info->rtfMajor;
|
||||
for (flip = TRUE;; flip = !flip)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue