mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #2788] [MERGED] Fix file descriptor leaks in error paths #2790
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#2790
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2788
Author: @CarstenGrohmann
Created: 1/23/2026
Status: ✅ Merged
Merged: 1/23/2026
Merged by: @ggtakec
Base:
master← Head:fix_fd_leaks📝 Commits (1)
081e2a7Fix file descriptor leaks in error paths📊 Changes
2 files changed (+6 additions, -1 deletions)
View changed files
📝
src/fdcache.cpp(+1 -0)📝
src/fdcache_entity.cpp(+5 -1)📄 Description
Close file descriptors before returning on error in three locations:
FdManager::MakeTempFile(): fd leaked whenunlink()failed after successfulmkstemp()FdEntity::Open():physical_fdleaked whenfstat()failed after opening cache fileFdEntity::Open():physical_fdleaked whenOpenMirrorFile()failedThese leaks would accumulate over time when error conditions occurred, eventually exhausting the process file descriptor limit.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.