mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-19 08:16:35 +00:00
Fix use after free
pn532_uart.c:293:5: warning: Use of memory after it is freed
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "pn53x_check_communication error on %s", ndd.port);
^ ~~~~~~~~
This commit is contained in:
@@ -290,7 +290,7 @@ pn532_uart_open(const nfc_context *context, const nfc_connstring connstring)
|
||||
|
||||
// Check communication using "Diagnose" command, with "Communication test" (0x00)
|
||||
if (pn53x_check_communication(pnd) < 0) {
|
||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "pn53x_check_communication error on %s", ndd.port);
|
||||
log_put(LOG_GROUP, LOG_CATEGORY, NFC_LOG_PRIORITY_ERROR, "pn53x_check_communication error");
|
||||
pn532_uart_close(pnd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user