mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-04-11 09:06:17 +00:00
pn53x_data_new() now returns null ptr upon malloc() error
This commit is contained in:
@@ -264,7 +264,10 @@ acr122_pcsc_open(const nfc_context *context, const nfc_connstring connstring)
|
||||
}
|
||||
|
||||
// Alloc and init chip's data
|
||||
pn53x_data_new(pnd, &acr122_pcsc_io);
|
||||
if (pn53x_data_new(pnd, &acr122_pcsc_io) == NULL) {
|
||||
perror("malloc");
|
||||
goto error;
|
||||
}
|
||||
|
||||
SCARDCONTEXT *pscc;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user