Skip to content
Snippets Groups Projects
Commit db66a64a authored by Loïc Molinari's avatar Loïc Molinari Committed by Marius Vlad
Browse files

rdp: Fix invalid free and memory leak on error


Peer context creation's error handling labels must be swapped to avoid
an invalid free when nsc context creation fails and a leak of the rfx
context when encode stream creation fails.

Signed-off-by: default avatarLoïc Molinari <loic.molinari@collabora.com>
parent ee5b6bcc
No related branches found
No related tags found
1 merge request!1578rdp: Fix invalid free and memory leak on error
......@@ -765,10 +765,10 @@ rdp_peer_context_new(freerdp_peer* client, RdpPeerContext* context)
return TRUE;
out_error_nsc:
rfx_context_free(context->rfx_context);
out_error_stream:
nsc_context_free(context->nsc_context);
out_error_nsc:
rfx_context_free(context->rfx_context);
return FALSE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment