On Sat, Apr 5, 2014 at 7:47 PM, Juris Kaminskis
<[hidden email]> wrote:
> root@station:/home/juris # opensc-tool -a
> Using reader with a card: SCM Microsystems Inc. SCR 3310 (21120702367313) 00
> Assertion failed: (card->lock_count == 0), function sc_disconnect_card, file
> card.c, line 256.
> Abort (core dumped)
> Do you possibly know why it fails?
Because the code is buggy and does not use equal amount of sc_unlock()
calls as it does sc_lock() calls.
Look at the diff of stock OpenSC vs the changed code to see if it adds
sc_lock() calls. I suspect some piece of code dealing with error
situations does not free the resource accordingly. This is a nice
example why assert-s are nice and apparently the code they release is
compiled with asserts off ?