pn532_spi: fix missing free(ndd.port)
This commit is contained in:
parent
87a3dd7067
commit
794fcdc1ad
@ -206,6 +206,7 @@ pn532_spi_open(const nfc_context *context, const nfc_connstring connstring)
|
|||||||
// We have a connection
|
// We have a connection
|
||||||
pnd = nfc_device_new(context, connstring);
|
pnd = nfc_device_new(context, connstring);
|
||||||
snprintf(pnd->name, sizeof(pnd->name), "%s:%s", PN532_SPI_DRIVER_NAME, ndd.port);
|
snprintf(pnd->name, sizeof(pnd->name), "%s:%s", PN532_SPI_DRIVER_NAME, ndd.port);
|
||||||
|
free(ndd.port);
|
||||||
|
|
||||||
pnd->driver_data = malloc(sizeof(struct pn532_spi_data));
|
pnd->driver_data = malloc(sizeof(struct pn532_spi_data));
|
||||||
DRIVER_DATA(pnd)->port = sp;
|
DRIVER_DATA(pnd)->port = sp;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user