mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-13 19:13:44 +00:00
Fix nfc_pick_device() when called from nfc_connect with NULL nfc_device_desc_t parameter (Fixes Issue 156)
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user