From ac11926c6112470e36c0f96811e677f8ed876200 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 3 Aug 2022 11:11:53 -0500 Subject: [PATCH] rdp: be more careful to free listener on output creation failure By the time we get to this failure we may (or may not) have implanted a listener. freerdp_listener_free() safely handles passed NULL pointers, so we don't have to add any additional checks on our end. Signed-off-by: Derek Foreman --- libweston/backend-rdp/rdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libweston/backend-rdp/rdp.c b/libweston/backend-rdp/rdp.c index 6d20b072..e0e87230 100644 --- a/libweston/backend-rdp/rdp.c +++ b/libweston/backend-rdp/rdp.c @@ -1776,7 +1776,7 @@ rdp_backend_create(struct weston_compositor *compositor, if (ret < 0) { weston_log("Failed to register output API.\n"); - goto err_output; + goto err_listener; } return b;