mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-04-11 17:16:18 +00:00
nfc_device_new(): replace err() by return
Not a good idea to call exit() from a library...
This commit is contained in:
@@ -280,6 +280,10 @@ acr122_pcsc_open(const nfc_context *context, const nfc_connstring connstring)
|
||||
|
||||
char *pcFirmware;
|
||||
nfc_device *pnd = nfc_device_new(context, fullconnstring);
|
||||
if (!pnd) {
|
||||
perror("malloc");
|
||||
goto error;
|
||||
}
|
||||
pnd->driver_data = malloc(sizeof(struct acr122_pcsc_data));
|
||||
if (!pnd->driver_data) {
|
||||
perror("malloc");
|
||||
|
||||
Reference in New Issue
Block a user