From 516040688ce9ba95224091d75b826c38a7a890e8 Mon Sep 17 00:00:00 2001 From: Segwon Date: Wed, 3 Jan 2018 13:22:51 +0900 Subject: [PATCH] gpio: fix to free a handle when peripheral_gdbus_gpio_close() is failed Change-Id: Ibab4d38a57e91b11f2c5a6e1b21e94d2c6e40eed Signed-off-by: Segwon --- src/peripheral_gpio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/peripheral_gpio.c b/src/peripheral_gpio.c index 0b4252c..eb2c999 100644 --- a/src/peripheral_gpio.c +++ b/src/peripheral_gpio.c @@ -105,10 +105,8 @@ int peripheral_gpio_close(peripheral_gpio_h gpio) /* call gpio_close */ ret = peripheral_gdbus_gpio_close(gpio); - if (ret != PERIPHERAL_ERROR_NONE) { + if (ret != PERIPHERAL_ERROR_NONE) _E("Failed to close the gpio pin, ret : %d", ret); - return ret; - } peripheral_interface_gpio_close(gpio); -- 2.34.1