mraa.c: fix error handling & leak in mraa_setup_mux_mapped

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>