From 4803d58bb4ea8d2a71ebc1e5239f09a060e9e7c3 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 31 Mar 2026 09:45:39 -0700 Subject: [PATCH] apprt/embedded: fix ghostty_surface_free_text parameter mismatch Fixes #12020 The C header declared ghostty_surface_free_text with both a ghostty_surface_t and ghostty_text_s* parameter, but the Zig implementation only accepted a *Text parameter. This caused the surface pointer to be interpreted as the text pointer, so the actual text allocation was never freed. --- src/apprt/embedded.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apprt/embedded.zig b/src/apprt/embedded.zig index 0d5a4f8da..519a35f2b 100644 --- a/src/apprt/embedded.zig +++ b/src/apprt/embedded.zig @@ -1675,7 +1675,7 @@ pub const CAPI = struct { return true; } - export fn ghostty_surface_free_text(ptr: *Text) void { + export fn ghostty_surface_free_text(_: *Surface, ptr: *Text) void { ptr.deinit(); }