From 628bec3eec313f4980b038e2541d3fc394559784 Mon Sep 17 00:00:00 2001 From: "jino.cho" Date: Thu, 18 May 2017 14:59:20 +0900 Subject: [PATCH] Check validation of pwm handle in the peripheral_pwm_close() Change-Id: I0b8ae08011188087819365a2dc5cd40bb6b14f39 Signed-off-by: jino.cho --- src/peripheral_pwm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/peripheral_pwm.c b/src/peripheral_pwm.c index 2b9c1a9..ecb9b4a 100644 --- a/src/peripheral_pwm.c +++ b/src/peripheral_pwm.c @@ -58,6 +58,8 @@ int peripheral_pwm_close(peripheral_pwm_h pwm) { int ret = PERIPHERAL_ERROR_NONE; + if (pwm == NULL) return PERIPHERAL_ERROR_INVALID_PARAMETER; + ret = peripheral_gdbus_pwm_close(pwm); pwm_proxy_deinit(); -- 2.7.4