aboutsummaryrefslogtreecommitdiff
path: root/src/device/device_ledger.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-06-09 20:49:05 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-06-09 20:52:34 +0100
commit03096150c626066bedf451846e6dbedd995df1aa (patch)
treeab499330a173a374ff2ec0758e7379f5d131d132 /src/device/device_ledger.cpp
parentMerge pull request #3340 (diff)
downloadmonero-03096150c626066bedf451846e6dbedd995df1aa.tar.xz
device_ledger: fix bad memory access on connect error
Diffstat (limited to '')
-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 3b9ab6744..641fe74c3 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -396,7 +396,7 @@ namespace hw {
}
}
- if (mszReaders) {
+ if (rv == SCARD_S_SUCCESS && mszReaders) {
#ifdef SCARD_AUTOALLOCATE
SCardFreeMemory(this->hContext, mszReaders);
#else