git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commitd63dedea73a879c2a1b2d3676b30374e0a21eb9b
parent4146ebf39c
authorIsaac Freund <[email protected]>
date2022-12-31 23:19
river-control: update zig-wayland to fix leak

It was forgotten to destroy the callback server side object when sending
the destructor event. With the new zig-wayland version, this cannot be
forgotten.

 deps/zig-wayland  | 2 +-
 river/Control.zig | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/deps/zig-wayland b/deps/zig-wayland
index e76a8ab..2f69a48 160000
--- a/deps/zig-wayland
+++ b/deps/zig-wayland
@@ -1 +1 @@
-Subproject commit e76a8abbfdfdce5019235078d4adca3ab4391430
+Subproject commit 2f69a48a4a29c4cd9834bf276848392e34795407
diff --git a/river/Control.zig b/river/Control.zig
index 083e820..0041fb5 100644
--- a/river/Control.zig
+++ b/river/Control.zig
@@ -116,7 +116,7 @@ fn handleRequest(control: *zriver.ControlV1, request: zriver.ControlV1.Request,
                     else => command.errToMsg(err),
                 };
                 defer if (err == command.Error.Other) util.gpa.free(failure_message);
-                callback.sendFailure(failure_message);
+                callback.destroySendFailure(failure_message);
                 return;
             };
 
@@ -128,7 +128,7 @@ fn handleRequest(control: *zriver.ControlV1, request: zriver.ControlV1.Request,
             else
                 "";
             defer if (out != null) util.gpa.free(success_message);
-            callback.sendSuccess(success_message);
+            callback.destroySendSuccess(success_message);
         },
     }
 }