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: Loïc Molinari <loic.molinari@collabora.com>
This commit is contained in:
parent
ee5b6bcc30
commit
db66a64aab
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue