mirror of
https://github.com/eclipse/upm.git
synced 2025-07-06 03:41:13 +03:00
memleak: Handle freeing return from spi call
mraa_spi_write_buf returns an allocated buffer. Added call to free the allocated memory. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -165,7 +165,8 @@ void
|
||||
APA102::pushState(void)
|
||||
{
|
||||
CSOn();
|
||||
m_spi->write(m_leds, m_frameLength);
|
||||
uint8_t* recv = m_spi->write(m_leds, m_frameLength);
|
||||
if (recv != NULL) free(recv);
|
||||
CSOff();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user