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:
committed by
Daniel Stone
parent
23205b6b56
commit
516d2c0207
@@ -1342,7 +1342,7 @@ rdp_backend_create(struct weston_compositor *compositor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rdp_implant_listener(b, b->listener) < 0)
|
if (rdp_implant_listener(b, b->listener) < 0)
|
||||||
goto err_compositor;
|
goto err_listener;
|
||||||
} else {
|
} else {
|
||||||
/* get the socket from RDP_FD var */
|
/* get the socket from RDP_FD var */
|
||||||
fd_str = getenv("RDP_FD");
|
fd_str = getenv("RDP_FD");
|
||||||
|
|||||||
Reference in New Issue
Block a user