summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2023-02-16 17:47:21 +0200
committerMarius Vlad <marius.vlad@collabora.com>2023-05-16 10:44:25 +0300
commit0ba5b694d38a343191de3a65c59e62b281d83125 (patch)
tree6d562c5c3450fcb6a9c6f39b50a830b0a6e11571
parent783b144f2e1beff5848e6c76ab765c3ed32d5b77 (diff)
remoting-plugin: Release and detach the head
This re-orders the disable/destroy shutdown sequence such that lookup_remoted_output(), in remoting_output_disable(), would find a remoting output. Otherwise, without this, lookup_remoted_output() wouldn't find a remoting output available when shutting down the compositor, ultimately leading to a crash. Signed-off-by: Marius Vlad <marius.vlad@collabora.com> (cherry picked from commit c3270e887bc07bb9c7d0e58e25d25e3a65145d2e)
-rw-r--r--remoting/remoting-plugin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/remoting/remoting-plugin.c b/remoting/remoting-plugin.c
index 0af43b5b..aabcd597 100644
--- a/remoting/remoting-plugin.c
+++ b/remoting/remoting-plugin.c
@@ -636,6 +636,8 @@ remoting_output_destroy(struct weston_output *output)
struct remoted_output *remoted_output = lookup_remoted_output(output);
struct weston_mode *mode, *next;
+ weston_head_release(remoted_output->head);
+
wl_list_for_each_safe(mode, next, &output->mode_list, link) {
wl_list_remove(&mode->link);
free(mode);
@@ -650,7 +652,6 @@ remoting_output_destroy(struct weston_output *output)
free(remoted_output->gst_pipeline);
wl_list_remove(&remoted_output->link);
- weston_head_release(remoted_output->head);
free(remoted_output->head);
free(remoted_output);
}