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

After a fork do not release resources shared with parent #494

Merged
merged 2 commits into from
Aug 4, 2015

Conversation

frankmorgner
Copy link
Member

This PR implements the second option proposed in #493 (comment) . I hope my approach is a bit cleaner and more complete than what is proposed in #493. Everything works as expected with a CardOS card and pkcs11-tool --test-fork --login --test

Frank Morgner added 2 commits July 22, 2015 16:46
- is initialized in sc_context_create with parm->flags
- removes members paranoid_memory and enable_default_driver
@frankmorgner
Copy link
Member Author

@nmav what do you think?

@nmav
Copy link
Contributor

nmav commented Jul 30, 2015

I haven't checked yet. I just returned from holidays. I'll try to find out some time and check it.

@nmav
Copy link
Contributor

nmav commented Aug 3, 2015

That patch looks simpler and cleaner than 493. As of memory leaks, they remain, but as I said in 493 they should be treated as a separate issue. Bottom line, please apply that fix.

@frankmorgner
Copy link
Member Author

@nmav thanks for the feedback.

Could you open a separate issue with the missing memory leaks? thank you!

frankmorgner pushed a commit that referenced this pull request Aug 4, 2015
After a fork do not release resources shared with parent
@frankmorgner frankmorgner merged commit d7d64ee into OpenSC:master Aug 4, 2015
@nmav
Copy link
Contributor

nmav commented Aug 4, 2015

On second view, this patch doesn't handle the case where after a fork, C_Finalize() is called (without C_Initialize()). If that happens the same error will occur. I'll open an issue for that.

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