Skip to content

Commit

Permalink
intel_edison_fab_c.c: fixed the pins not being freed in the event of …
Browse files Browse the repository at this point in the history
…a tristate read failing

Signed-off-by: Houman Brinjcargorabi <[email protected]>
Signed-off-by: Brendan Le Foll <[email protected]>
  • Loading branch information
Houman brinjcargorabi authored and arfoll committed Jun 1, 2016
1 parent e8d6f38 commit 8329bca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/x86/intel_edison_fab_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8329bca

Please sign in to comment.