mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-07-21 10:44:25 +00:00
rdp: fix leak when listener implantation fails
We've already allocated the listener by the time we hit this failure, so we must exit through the path that frees it. Co-authored-by: Steve Pronovost <spronovo@microsoft.com> Co-authored-by: Brenton DeGeer <brdegeer@microsoft.com> Signed-off-by: Hideyuki Nagase <hideyukn@microsoft.com> Signed-off-by: Steve Pronovost <spronovo@microsoft.com> Signed-off-by: Brenton DeGeer <brdegeer@microsoft.com>
This commit is contained in:
parent
23205b6b56
commit
516d2c0207
|
@ -1342,7 +1342,7 @@ rdp_backend_create(struct weston_compositor *compositor,
|
|||
}
|
||||
|
||||
if (rdp_implant_listener(b, b->listener) < 0)
|
||||
goto err_compositor;
|
||||
goto err_listener;
|
||||
} else {
|
||||
/* get the socket from RDP_FD var */
|
||||
fd_str = getenv("RDP_FD");
|
||||
|
|
Loading…
Reference in a new issue