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:
f3ffa19
)
server: proxy: fix leak in pf_context_copy_settings
author
Kobi Mizrachi
<kmizrachi18@gmail.com>
Thu, 2 Jan 2020 13:19:08 +0000
(15:19 +0200)
committer
akallabeth
<akallabeth@users.noreply.github.com>
Mon, 13 Jan 2020 12:41:44 +0000
(13:41 +0100)
server/proxy/pf_context.c
patch
|
blob
|
history
diff --git
a/server/proxy/pf_context.c
b/server/proxy/pf_context.c
index
56cb671
..
76e1a02
100644
(file)
--- a/
server/proxy/pf_context.c
+++ b/
server/proxy/pf_context.c
@@
-131,7
+131,15
@@
BOOL pf_context_copy_settings(rdpSettings* dst, const rdpSettings* src)
{
/* adjust instance pointer for client's context */
dst->instance = before_copy->instance;
- /* RdpServerRsaKey must be set to NULL if `dst` is client's context */
+
+ /*
+ * RdpServerRsaKey must be set to NULL if `dst` is client's context
+ * it must be freed before setting it to NULL to avoid a memory leak!
+ */
+
+ free(dst->RdpServerRsaKey->Modulus);
+ free(dst->RdpServerRsaKey->PrivateExponent);
+ free(dst->RdpServerRsaKey);
dst->RdpServerRsaKey = NULL;
}