From 4a40ae771866f004ada26382a9617f93d0d98547 Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Thu, 29 Jun 2023 14:47:21 +0200
Subject: [PATCH] libweston: deduplicate compositor shutdown in backend_init
failure path
If backend initialization fails, weston_compositor_shutdown() is called
twice, once right away in weston_compositor_load_backend(), and once in
weston_compositor_destroy().
Remove the first and fix a segfault when trying to weston_plane_remove()
the primary plane a second time.
Fixes: 90c11cf40e5c ("libweston: move weston_compositor_shutdown call out of backends")
Signed-off-by: Philipp Zabel
---
libweston/compositor.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/libweston/compositor.c b/libweston/compositor.c
index 766ebd529..64a54dda1 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -9198,7 +9198,6 @@ weston_compositor_load_backend(struct weston_compositor *compositor,
if (backend_init(compositor, config_base) < 0) {
compositor->backend = NULL;
- weston_compositor_shutdown(compositor);
return -1;
}