-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingp2-mediumDegraded experience, workaround existsDegraded experience, workaround existsupstreamBug exists in upstream ghosttyBug exists in upstream ghosttyzig-forkRequires Ghostty fork changesRequires Ghostty fork changes
Description
Summary
In embedded.zig:800-834, when completeClipboardRequest throws UnsafePaste or UnauthorizedPaste, the state pointer is NOT freed (the defer is skipped via early return). The expectation is the embedder will call ghostty_surface_complete_clipboard_request again with the confirmation.
If the embedder dismisses the confirmation dialog without calling back, the ClipboardRequest allocation leaks permanently.
Fix
Either:
- Provide an explicit
ghostty_surface_cancel_clipboard_request(state)API for the dismiss case. - Track outstanding clipboard requests on the surface and clean them up in
deinit.
Severity
MEDIUM — Memory leak per dismissed clipboard confirmation. Accumulates over time.
Source
Identified during code review of daiimus/ghostty:ios-external-backend.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingp2-mediumDegraded experience, workaround existsDegraded experience, workaround existsupstreamBug exists in upstream ghosttyBug exists in upstream ghosttyzig-forkRequires Ghostty fork changesRequires Ghostty fork changes