Fix nfc_pick_device() when called from nfc_connect with NULL nfc_device_desc_t parameter (Fixes Issue 156)
This commit is contained in:
parent
cfc5273275
commit
605a5f2db3
3 changed files with 5 additions and 9 deletions
|
@ -185,9 +185,7 @@ acr122_probe (nfc_device_desc_t pnddDevices[], size_t szDevices, size_t * pszDev
|
||||||
}
|
}
|
||||||
acr122_free_scardcontext ();
|
acr122_free_scardcontext ();
|
||||||
|
|
||||||
if (*pszDeviceFound)
|
|
||||||
return true;
|
return true;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nfc_device_t *
|
nfc_device_t *
|
||||||
|
|
|
@ -206,9 +206,8 @@ pn53x_usb_probe (nfc_device_desc_t pnddDevices[], size_t szDevices, size_t * psz
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (*pszDeviceFound)
|
|
||||||
return true;
|
return true;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -191,9 +191,8 @@ nfc_pick_device (void)
|
||||||
size_t szN;
|
size_t szN;
|
||||||
|
|
||||||
if (!ndr->probe (pndd, 1, &szN)) {
|
if (!ndr->probe (pndd, 1, &szN)) {
|
||||||
DBG ("%s probe failed", ndr->name);
|
ERR ("%s probe failed", ndr->name);
|
||||||
free (pndd);
|
szN = 0;
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (szN == 0) {
|
if (szN == 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue