summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2023-01-17 14:15:30 +0100
committerMarge Bot <emma+marge@anholt.net>2023-01-25 10:37:59 +0000
commit56c8755173144fd8c5209113cdedbea5702d3713 (patch)
tree2266049ea8d1b22ea6283394668c8d1181115cb9 /server
parent2b61218a23b5a7da533e8183611af98214bf70ab (diff)
server: Always return false on creation failure
Even if the reply got sent properly we are still failing to create the context. Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1025>
Diffstat (limited to 'server')
-rw-r--r--server/render_client.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/render_client.c b/server/render_client.c
index b487b8b..a70bb4d 100644
--- a/server/render_client.c
+++ b/server/render_client.c
@@ -194,8 +194,10 @@ render_client_dispatch_create_context(struct render_client *client,
const struct render_client_op_create_context_reply reply = {
.ok = ok,
};
- if (!ok)
- return render_socket_send_reply(&client->socket, &reply, sizeof(reply));
+ if (!ok) {
+ render_socket_send_reply(&client->socket, &reply, sizeof(reply));
+ return false;
+ }
ok = render_socket_send_reply_with_fds(&client->socket, &reply, sizeof(reply),
&remote_fd, 1);