aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-06-25 15:26:23 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-06-25 15:26:23 -0500
commit31f47d72fe62310da083eab42071da6068308f3d (patch)
treee659f70b0ab4a2b0dd7b010461279163c5a23488
parentMerge pull request #3975 (diff)
parentdevice_ledger: fix bad memory access on connect error (diff)
downloadmonero-31f47d72fe62310da083eab42071da6068308f3d.tar.xz
Merge pull request #3977
0309615 device_ledger: fix bad memory access on connect error (moneromooo-monero)
-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