From 5ba9d51d287ec1ebc01335d5132cd27cf91c5a62 Mon Sep 17 00:00:00 2001 From: "sung.goo.kim" Date: Wed, 2 Mar 2016 07:59:14 +0900 Subject: [PATCH] Fix invalid error handling Change-Id: Ie35f8594126a6ccc649a4bceead41fa144078c30 --- lib/icl-query.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/icl-query.c b/lib/icl-query.c index 5cd3da8..301c21d 100644 --- a/lib/icl-query.c +++ b/lib/icl-query.c @@ -76,11 +76,11 @@ API int iotcon_query_get_resource_type(iotcon_query_h query, API int iotcon_query_get_interface(iotcon_query_h query, char **resource_iface) { - char *iface; + char *iface = NULL; RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED); RETV_IF(NULL == query, IOTCON_ERROR_INVALID_PARAMETER); - RETV_IF(NULL == iface, IOTCON_ERROR_INVALID_PARAMETER); + RETV_IF(NULL == resource_iface, IOTCON_ERROR_INVALID_PARAMETER); iotcon_query_lookup(query, ICL_QUERY_KEY_INTERFACE, &iface); if (NULL == iface) { -- 2.34.1