intel_edison_fab_c.c: fixed the pins not being freed in the event of a tristate read failing
Signed-off-by: Houman Brinjcargorabi <houman.brinjcargorabi@intel.com> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
e8d6f38ee0
commit
8329bcab62
@@ -1274,8 +1274,9 @@ mraa_intel_edison_fab_c()
|
||||
}
|
||||
|
||||
if (mraa_gpio_read_dir(tristate, &tristate_dir) != MRAA_SUCCESS) {
|
||||
free(b->adv_func);
|
||||
goto error;
|
||||
free(b->pins);
|
||||
free(b->adv_func);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (tristate_dir != MRAA_GPIO_OUT) {
|
||||
|
||||
Reference in New Issue
Block a user