mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00
memleak: i2c init was getting called twice
Removed duplicate call to mraa_i2c_init which was allocating space for the i2c device twice. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
parent
13eea53090
commit
65969462d1
@ -36,7 +36,7 @@ ADC121C021::ADC121C021(int bus, uint8_t address, float vref)
|
||||
{
|
||||
// setup our i2c link
|
||||
m_i2c = mraa_i2c_init(bus);
|
||||
if ( !(m_i2c = mraa_i2c_init(bus)) )
|
||||
if (!m_i2c)
|
||||
{
|
||||
throw std::invalid_argument(std::string(__FUNCTION__) +
|
||||
": mraa_i2c_init() failed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user