Created attachment 616504 [details]
Log of test runs (using valgrind and gdb)
I ran "valgrind --leak-check=full", getting "free(): corrupted unsorted
chunks", and I saved a core dump (analyzed with gdb), giving this backtrace:
(gdb) bt
#0 0x00007f37bb2c5187 in raise () from /lib64/libc.so.6
#1 0x00007f37bb2c6538 in abort () from /lib64/libc.so.6
#2 0x00007f37bb3030c4 in __libc_message () from /lib64/libc.so.6
#3 0x00007f37bb30892e in malloc_printerr () from /lib64/libc.so.6
#4 0x00007f37bb309636 in _int_free () from /lib64/libc.so.6
#5 0x00007f37b9120f84 in ausb_close (ah=0x7f37b4006890) at ausb.c:178
#6 0x00007f37b911dea6 in CUSBUnix::Close (this=0x7f37b4004d20) at
USBUnix.cpp:396
#7 0x00007f37b911deff in CUSBUnix::~CUSBUnix (this=0x7f37b4004d20,
__in_chrg=<optimized out>)
at USBUnix.cpp:161
#8 0x00007f37b911df29 in CUSBUnix::~CUSBUnix (this=0x7f37b4004d20,
__in_chrg=<optimized out>)
at USBUnix.cpp:162
#9 0x00007f37b911c288 in CReader::Disonnect (this=0x7f37b4007e80) at
Reader.cpp:187
#10 0x00007f37b910761a in IFDHandler::closeChannel
(this=this@entry=0x7f37b9335500 <rsct_ifd_handler>,
Lun=Lun@entry=0) at ifd.cpp:643
#11 0x00007f37b91077f9 in IFDHCloseChannel (Lun=0) at ifd.cpp:1506