diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2023-10-27 16:16:19 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2023-10-27 16:54:38 +0300 |
commit | 0d2e33ded529d216bb5914887b2384e765e3eae7 (patch) | |
tree | 9c51428829ed9fddf6f123d1025797db9bf3b548 /grpc-proxy/main-grpc.cpp | |
parent | 994d8a30b27f05516f6dc0a9f949315241cb9cc0 (diff) |
grpc-proxy/main-grpc: Don't fall trough assuming we have a wl_display
Maybe the third time is a charm to avoid fall through and assume on the
exit path we do have a wl_display.
Bug-AGL: SPEC-4935
Reported-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
Tested-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I4adef5bf72d6b1a32a218bf1cfa6c8ed4450ba48
Diffstat (limited to 'grpc-proxy/main-grpc.cpp')
-rw-r--r-- | grpc-proxy/main-grpc.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/grpc-proxy/main-grpc.cpp b/grpc-proxy/main-grpc.cpp index a8c1c5e..5569fc8 100644 --- a/grpc-proxy/main-grpc.cpp +++ b/grpc-proxy/main-grpc.cpp @@ -387,7 +387,8 @@ __register_shell_init(void) wl_display = wl_display_connect(NULL); if (!wl_display) { - goto err; + ret = -1; + goto err_failed_display; } registry = wl_display_get_registry(wl_display); sh->wait_for_bound = true; @@ -416,6 +417,8 @@ __register_shell_init(void) err: wl_registry_destroy(registry); wl_display_disconnect(wl_display); + +err_failed_display: delete sh; return ret; } |