Skip to content

Commit

Permalink
Better to close file explicitly (#5289)
Browse files Browse the repository at this point in the history
Signed-off-by: Changxin Miao <[email protected]>
  • Loading branch information
polyrabbit authored Nov 14, 2024
1 parent 8b5bd9d commit b51b622
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/fuse/device_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func grantAccess() error {
if err != nil {
return errors.Wrapf(err, "open %s", deviceAllowPath)
}
defer f.Close()
// 10, 229 according to https://www.kernel.org/doc/Documentation/admin-guide/devices.txt
content := "c 10:229 rwm"
_, err = f.WriteString(content)
Expand Down

0 comments on commit b51b622

Please sign in to comment.