Fix some memory leaks

This commit is contained in:
Ben Buhse 2026-02-22 17:38:28 -06:00
commit 8e6c28da7b
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
7 changed files with 37 additions and 10 deletions

View file

@ -285,12 +285,13 @@ fn isSupported(comptime E: type, comptime S: type, val: E, support: S) bool {
/// log any unsupported or invalid config responses from the compositor.
fn applyResult(result: anyerror!*river.LibinputResultV1) void {
const Listener = struct {
fn resultListener(_: *river.LibinputResultV1, event: river.LibinputResultV1.Event, _: ?*anyopaque) void {
fn resultListener(libinput_result: *river.LibinputResultV1, event: river.LibinputResultV1.Event, _: ?*anyopaque) void {
switch (event) {
.success => {},
.unsupported => log.debug("Config option unsupported by device", .{}),
.invalid => log.warn("Invalid config value for device", .{}),
}
libinput_result.destroy();
}
};