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:
53450b6
)
Fixed free of uninitialized value.
author
Armin Novak
<armin.novak@gmail.com>
Sun, 16 Nov 2014 15:01:08 +0000
(16:01 +0100)
committer
Armin Novak
<armin.novak@gmail.com>
Sun, 16 Nov 2014 15:01:08 +0000
(16:01 +0100)
channels/cliprdr/client/cliprdr_format.c
patch
|
blob
|
history
diff --git
a/channels/cliprdr/client/cliprdr_format.c
b/channels/cliprdr/client/cliprdr_format.c
index
239a8ad
..
bdd100b
100644
(file)
--- a/
channels/cliprdr/client/cliprdr_format.c
+++ b/
channels/cliprdr/client/cliprdr_format.c
@@
-152,6
+152,9
@@
void cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 data
Stream_Rewind(s, dataLen);
formats = (CLIPRDR_FORMAT*) malloc(sizeof(CLIPRDR_FORMAT) * formatList.numFormats);
+ if (!formats)
+ return;
+
formatList.formats = formats;
while (dataLen)
@@
-186,7
+189,10
@@
void cliprdr_process_format_list(cliprdrPlugin* cliprdr, wStream* s, UINT32 data
context->ServerFormatList(context, &formatList);
for (index = 0; index < formatList.numFormats; index++)
- free(formats[index].formatName);
+ {
+ if (formats[index].formatName)
+ free(formats[index].formatName);
+ }
free(formats);
}