Skip to content

Conversation

@Johnson-zs
Copy link

No description provided.

@Johnson-zs
Copy link
Author

sqfs_destroy only releases memory resources and does not close file descriptors.

@TheAssassin
Copy link
Member

Could you please explain this in more detail? It seems like a bug in squashfuse to me. You have to include another header for this to work, actually. The destroy function should take care of this it seems.

@Johnson-zs
Copy link
Author

Could you please explain this in more detail? It seems like a bug in squashfuse to me. You have to include another header for this to work, actually. The destroy function should take care of this it seems.

Actually, I also discovered this issue after noticing the FD leak and reading the squashfuse source code. The sqfs_open_image is a convenience function that encapsulates open + init, while sqfs_destroy only handles the cleanup corresponding to init but lacks the cleanup for open.

Additionally, I noticed in its source code (https://github.com/vasi/squashfuse/blob/e1e237a7ee9f0646d05aa85d20939c49555279db/ls.c#L73) that after calling sqfs_open_image, sqfs_fd_close is also used to clean up the FD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants