Add out-param null check
authorsung.goo.kim <sung.goo.kim@samsung.com>
Thu, 10 Dec 2015 02:25:59 +0000 (11:25 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Thu, 10 Dec 2015 11:45:38 +0000 (20:45 +0900)
Change-Id: I2391e6a490f714139beb4d9627900c2343a37642

lib/icl-resource.c

index b077a6c..18f98ef 100644 (file)
@@ -172,6 +172,7 @@ API int iotcon_resource_create(const char *uri_path,
                        IOTCON_ERROR_INVALID_PARAMETER, "Invalid uri_path(%s)", uri_path);
        RETV_IF(NULL == res_types, IOTCON_ERROR_INVALID_PARAMETER);
        RETV_IF(NULL == cb, IOTCON_ERROR_INVALID_PARAMETER);
+       RETV_IF(NULL == resource_handle, IOTCON_ERROR_INVALID_PARAMETER);
 
        resource = calloc(1, sizeof(struct icl_resource));
        if (NULL == resource) {