aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/device/device_ledger.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
index aedaf8382..c70422887 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -405,7 +405,7 @@ namespace hw {
}
}
- if (mszReaders) {
+ if (rv == SCARD_S_SUCCESS && mszReaders) {
#ifdef SCARD_AUTOALLOCATE
SCardFreeMemory(this->hContext, mszReaders);
#else