pn532_spi: fix missing free(ndd.port)

This commit is contained in:
Philippe Teuwen 2013-03-27 11:51:22 +01:00
parent 87a3dd7067
commit 794fcdc1ad

View file

@ -206,6 +206,7 @@ pn532_spi_open(const nfc_context *context, const nfc_connstring connstring)
// We have a connection
pnd = nfc_device_new(context, connstring);
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));
DRIVER_DATA(pnd)->port = sp;