mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-15 14:48:08 +02:00
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
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue