mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[PR #2177] [MERGED] Use smart pointer to manage pcfstat object #2374
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#2374
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/2177
Author: @eryugey
Created: 5/31/2023
Status: ✅ Merged
Merged: 7/19/2023
Merged by: @gaul
Base:
master← Head:dev📝 Commits (1)
503a4bdUse smart pointer to manage pcfstat object📊 Changes
1 file changed (+4 additions, -6 deletions)
View changed files
📝
src/fdcache_entity.cpp(+4 -6)📄 Description
Previously pcfstat points to a raw pointer, and it may be leaked if
function returned before deleting it.
So use smart pointer to automatically release the object.
Note that currently s3fs only uses c++03, so we use auto_ptr here, not
unique_ptr, which requires c++11.
Fixes:
github.com/s3fs-fuse/s3fs-fuse@6ca5a24a7f("Fix two inconsistency issues between stat cache and cache file (https://github.com/s3fs-fuse/s3fs-fuse/pull/2152)")Signed-off-by: Eryu Guan eguan@linux.alibaba.com
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
std::unique_ptrin threadpoolman #2508