mirror of https://github.com/FreeRDP/FreeRDP
client/common: Fix two memory leaks in RDP file processing
FALSE is returned immediately in case of parsing error and thus buffer copy is leaked. Let's release the memory properly.
This commit is contained in:
parent
e5574f276a
commit
90000fd36e
|
@ -448,12 +448,12 @@ BOOL freerdp_client_parse_rdp_file_buffer(rdpFile* file, const BYTE* buffer,
|
|||
beg = line;
|
||||
|
||||
if (freerdp_client_parse_rdp_file_add_line(file, line, index) == -1)
|
||||
return FALSE;
|
||||
goto fail;
|
||||
|
||||
if (beg[0] == '/')
|
||||
{
|
||||
if (!freerdp_client_parse_rdp_file_option(file, line, index))
|
||||
return FALSE;
|
||||
goto fail;
|
||||
|
||||
goto next_line; /* FreeRDP option */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue