libfreerdp-core: fix some RDG valgrind issues
This commit is contained in:
parent
360e2c5e4e
commit
dc913d9f2c
@ -446,6 +446,9 @@ void http_request_free(HttpRequest* request)
|
||||
free(request->Content);
|
||||
free(request->Method);
|
||||
free(request->URI);
|
||||
|
||||
free(request->TransferEncoding);
|
||||
|
||||
free(request);
|
||||
}
|
||||
|
||||
@ -759,7 +762,9 @@ HttpResponse* http_response_recv(rdpTls* tls)
|
||||
|
||||
if (response->ContentType)
|
||||
{
|
||||
if (_stricmp(response->ContentType, "text/plain") == 0)
|
||||
if (_stricmp(response->ContentType, "application/rpc") != 0)
|
||||
bodyLength = response->ContentLength;
|
||||
else if (_stricmp(response->ContentType, "text/plain") == 0)
|
||||
bodyLength = response->ContentLength;
|
||||
else if (_stricmp(response->ContentType, "text/html") == 0)
|
||||
bodyLength = response->ContentLength;
|
||||
@ -829,8 +834,11 @@ void http_response_free(HttpResponse* response)
|
||||
|
||||
ListDictionary_Free(response->Authenticates);
|
||||
|
||||
if (response->ContentLength > 0)
|
||||
if (response->BodyContent)
|
||||
{
|
||||
free(response->BodyContent);
|
||||
response->BodyContent = NULL;
|
||||
}
|
||||
|
||||
free(response);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -802,6 +802,12 @@ BOOL transport_disconnect(rdpTransport* transport)
|
||||
transport->tsg = NULL;
|
||||
}
|
||||
|
||||
if (transport->rdg)
|
||||
{
|
||||
rdg_free(transport->rdg);
|
||||
transport->rdg = NULL;
|
||||
}
|
||||
|
||||
transport->frontBio = NULL;
|
||||
|
||||
transport->layer = TRANSPORT_LAYER_TCP;
|
||||
|
@ -39,6 +39,10 @@
|
||||
#include <poll.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
#include <valgrind/memcheck.h>
|
||||
#endif
|
||||
|
||||
#define TAG FREERDP_TAG("crypto")
|
||||
|
||||
struct _BIO_RDP_TLS
|
||||
@ -180,6 +184,13 @@ static int bio_rdp_tls_read(BIO* bio, char* buf, int size)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
if (status > 0)
|
||||
{
|
||||
VALGRIND_MAKE_MEM_DEFINED(buf, status);
|
||||
}
|
||||
#endif
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user