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:
d3c1db1
)
Fixed resource leak in rpc_ntlm_http_request
author
Armin Novak
<armin.novak@thincast.com>
Thu, 25 Oct 2018 10:49:42 +0000
(12:49 +0200)
committer
Armin Novak
<armin.novak@thincast.com>
Thu, 25 Oct 2018 10:49:42 +0000
(12:49 +0200)
libfreerdp/core/gateway/ncacn_http.c
patch
|
blob
|
history
diff --git
a/libfreerdp/core/gateway/ncacn_http.c
b/libfreerdp/core/gateway/ncacn_http.c
index
a1c8916
..
10813a8
100644
(file)
--- a/
libfreerdp/core/gateway/ncacn_http.c
+++ b/
libfreerdp/core/gateway/ncacn_http.c
@@
-44,6
+44,9
@@
static wStream* rpc_ntlm_http_request(HttpContext* http, const char* method,
request = http_request_new();
+ if (!request)
+ goto fail;
+
if (ntlmToken)
base64NtlmToken = crypto_base64_encode(ntlmToken->pvBuffer, ntlmToken->cbBuffer);
@@
-52,7
+55,7
@@
static wStream* rpc_ntlm_http_request(HttpContext* http, const char* method,
if (!http_request_set_method(request, method) ||
!http_request_set_content_length(request, contentLength) ||
!http_request_set_uri(request, uri))
-
return NULL
;
+
goto fail
;
if (base64NtlmToken)
{