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

Leaking sockets #50

Closed
MartinN-n opened this issue Nov 13, 2018 · 2 comments
Closed

Leaking sockets #50

MartinN-n opened this issue Nov 13, 2018 · 2 comments

Comments

@MartinN-n
Copy link

Hello,

it seems libpcsc is leaking sockets if connection is dropped by e.g. polkit. From my (brief) investigation, while socket is created in ClientSetupSession() called from SCardEstablishContextTH(), resulting socket in dwClientID is not stored in context until the end of this session, while you can exit on e.g. MessageReceive() failure in the very next block after ClientSetupSession().
This leads to growing number of open files, should the application repeatedly try to call SCardEstablishContext(), and eventually everything explodes...

Did I miss anything?

Thanks,
Martin

@LudovicRousseau
Copy link
Owner

You are right.
Working on a fix.

LudovicRousseau added a commit that referenced this issue Nov 15, 2018
When SCardEstablishContext() failed after the connection to the daemon
was made (for example when polkit is used) then the socket to the daemon
was not closed.

Thanks to MartinN-n for the bug report
"Leaking sockets #50"
#50
@LudovicRousseau
Copy link
Owner

Fixed in dd34cb3

Thanks

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

No branches or pull requests

2 participants