projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5574f2
)
client/common: Fix two memory leaks in RDP file processing
author
Ondrej Holy
<oholy@redhat.com>
Fri, 24 Nov 2017 09:24:47 +0000
(10:24 +0100)
committer
Ondrej Holy
<oholy@redhat.com>
Fri, 24 Nov 2017 09:24:47 +0000
(10:24 +0100)
FALSE is returned immediately in case of parsing error and thus buffer
copy is leaked. Let's release the memory properly.
client/common/file.c
patch
|
blob
|
history
diff --git
a/client/common/file.c
b/client/common/file.c
index
c9d45f6
..
0fbf363
100644
(file)
--- a/
client/common/file.c
+++ b/
client/common/file.c
@@
-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 */
}