libfreerdp-core: fix memory leaks.
This commit is contained in:
parent
7b23ed6f97
commit
025e7f9c9b
@ -293,6 +293,8 @@ boolean rdp_read_extended_info_packet(STREAM* s, rdpSettings* settings)
|
|||||||
stream_read_uint16(s, cbClientDir); /* cbClientDir */
|
stream_read_uint16(s, cbClientDir); /* cbClientDir */
|
||||||
if (stream_get_left(s) < cbClientDir)
|
if (stream_get_left(s) < cbClientDir)
|
||||||
return False;
|
return False;
|
||||||
|
if (settings->client_dir)
|
||||||
|
xfree(settings->client_dir);
|
||||||
settings->client_dir = freerdp_uniconv_in(settings->uniconv, stream_get_tail(s), cbClientDir);
|
settings->client_dir = freerdp_uniconv_in(settings->uniconv, stream_get_tail(s), cbClientDir);
|
||||||
stream_seek(s, cbClientDir);
|
stream_seek(s, cbClientDir);
|
||||||
|
|
||||||
|
@ -354,7 +354,7 @@ void nego_send_negotiation_request(rdpNego* nego)
|
|||||||
int length;
|
int length;
|
||||||
uint8 *bm, *em;
|
uint8 *bm, *em;
|
||||||
|
|
||||||
s = stream_new(64);
|
s = transport_send_stream_init(nego->transport, 256);
|
||||||
length = TPDU_CONNECTION_REQUEST_LENGTH;
|
length = TPDU_CONNECTION_REQUEST_LENGTH;
|
||||||
stream_get_mark(s, bm);
|
stream_get_mark(s, bm);
|
||||||
stream_seek(s, length);
|
stream_seek(s, length);
|
||||||
@ -488,7 +488,7 @@ void nego_send_negotiation_response(rdpNego* nego)
|
|||||||
int length;
|
int length;
|
||||||
uint8 *bm, *em;
|
uint8 *bm, *em;
|
||||||
|
|
||||||
s = stream_new(64);
|
s = transport_send_stream_init(nego->transport, 256);
|
||||||
length = TPDU_CONNECTION_CONFIRM_LENGTH;
|
length = TPDU_CONNECTION_CONFIRM_LENGTH;
|
||||||
stream_get_mark(s, bm);
|
stream_get_mark(s, bm);
|
||||||
stream_seek(s, length);
|
stream_seek(s, length);
|
||||||
|
@ -596,6 +596,7 @@ void rdp_free(rdpRdp* rdp)
|
|||||||
input_free(rdp->input);
|
input_free(rdp->input);
|
||||||
update_free(rdp->update);
|
update_free(rdp->update);
|
||||||
fastpath_free(rdp->fastpath);
|
fastpath_free(rdp->fastpath);
|
||||||
|
nego_free(rdp->nego);
|
||||||
mcs_free(rdp->mcs);
|
mcs_free(rdp->mcs);
|
||||||
vchan_free(rdp->vchan);
|
vchan_free(rdp->vchan);
|
||||||
xfree(rdp);
|
xfree(rdp);
|
||||||
|
@ -251,6 +251,10 @@ void tls_free(rdpTls* tls)
|
|||||||
{
|
{
|
||||||
if (tls != NULL)
|
if (tls != NULL)
|
||||||
{
|
{
|
||||||
|
if (tls->ssl)
|
||||||
|
SSL_free(tls->ssl);
|
||||||
|
if (tls->ctx)
|
||||||
|
SSL_CTX_free(tls->ctx);
|
||||||
xfree(tls);
|
xfree(tls);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user