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:
232aa89
)
Fixed memory leak.
author
Armin Novak
<armin.novak@gmail.com>
Sun, 16 Nov 2014 23:26:33 +0000
(
00:26
+0100)
committer
Armin Novak
<armin.novak@gmail.com>
Sun, 16 Nov 2014 23:26:33 +0000
(
00:26
+0100)
client/X11/xf_cliprdr.c
patch
|
blob
|
history
diff --git
a/client/X11/xf_cliprdr.c
b/client/X11/xf_cliprdr.c
index
7b5aa6c
..
d25d758
100644
(file)
--- a/
client/X11/xf_cliprdr.c
+++ b/
client/X11/xf_cliprdr.c
@@
-317,6
+317,8
@@
static void xf_cliprdr_process_requested_data(xfClipboard* clipboard, BOOL hasDa
CopyMemory(pSrcData, data, SrcSize);
bSuccess = ClipboardSetData(clipboard->system, formatId, (void*) pSrcData, SrcSize);
+ if (!bSuccess)
+ free (pSrcData);
pFormatIds = NULL;
count = ClipboardGetFormatIds(clipboard->system, &pFormatIds);
@@
-992,6
+994,8
@@
static int xf_cliprdr_server_format_data_response(CliprdrClientContext* context,
CopyMemory(pSrcData, data, SrcSize);
bSuccess = ClipboardSetData(clipboard->system, formatId, (void*) pSrcData, SrcSize);
+ if (!bSuccess)
+ free (pSrcData);
if (bSuccess && altFormatId)
{