Private
Public Access
2
0

mraa.c: Fixed memleak of device_path for IEI_TANK

Unfortunately the device_path char* is dynamically allocated
and #defined and const char *'ed depending on how each platform provided the
uart device paths which makes cleaning it up more complicated.

Added a check for the IEI_TANK.

Removed the char** (in favor of a char*) for mraa_find_uart_bus_pci.)

Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
Noel Eck
2018-06-14 15:16:16 -07:00
parent 4c4845b101
commit 17342cbbbb
2 changed files with 12 additions and 7 deletions

View File

@@ -176,7 +176,7 @@ int mraa_find_i2c_bus_pci(const char* pci_device, const char *pci_id, const char
* @param dev_name as retrieved from pci_dev_path
* @return Result of the operation
*/
mraa_result_t mraa_find_uart_bus_pci(const char* pci_dev_path, char** dev_name);
mraa_result_t mraa_find_uart_bus_pci(const char* pci_dev_path, char* dev_name);
#if defined(IMRAA)
/**