Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of cleanup attribute in p11-kit commands #577

Open
ueno opened this issue Sep 22, 2023 · 0 comments
Open

Make use of cleanup attribute in p11-kit commands #577

ueno opened this issue Sep 22, 2023 · 0 comments

Comments

@ueno
Copy link
Member

ueno commented Sep 22, 2023

Modern C compilers support the cleanup attribute for automatically release resources (memory, open file descriptor, etc.) at function exit. We could use it in the p11-kit commands instead of manual cleanup, as in systemd or GLib.

It might be worth noting that we probably shouldn't use this technique in the library as it intends to be portable.

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

No branches or pull requests

1 participant