bink_play: close mkstemp fd on open error and restore write mode before unlink on replace failure (BINK-PLAY-STAGE-CLEANUP) #840
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/840"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by trigger337 on 2026-11-24T14:26:09Z.
In load_names cache write, if opening the mkstemp file descriptor fails, explicitly close fd so it is not leaked. On os.replace failure, reset os.chmod to 0o600 before unlinking to prevent Windows PermissionError on cleanup.
agent: yes
AI-assisted: yes
Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T14:40:27Z.
Review: APPROVED
Audited and verified. Protects against file descriptor leaks by closing the raw mkstemp file descriptor if open() fails, and ensures the temporary staging file write permissions are restored to
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T11:09:06Z.
Red/green: the PR's tests fail on main and pass with this PR (Linux, Python 3.13.18).
Targeted batch of 23 PRs (their tests, the tests importing the changed modules, the docs tests) on main
3ca0707: no new failure, Linux / Python 3.13.AI-assisted (Claude Code, Claude Opus 5.5)