things-manager: Fix cppcheck issues in TMSampleApp for tizen
authorRavi Nanjundappa <nravi.n@samsung.com>
Fri, 3 Jul 2015 11:11:27 +0000 (16:41 +0530)
committerUze Choi <uzchoi@samsung.com>
Wed, 8 Jul 2015 05:38:40 +0000 (05:38 +0000)
This patch fixes the below issues
reported by cppcheck tool in TMSampleApp dir for tizen.
"(error) Possible null pointer dereference: popup_fields ...."

It is invliad to set the member of popup_field to NULL if
popup_field itself is NULL.
Removed such statements from the code.

Change-Id: Ie1457662cb2727e5bab5e21886db6bece2f356a7
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1511
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Harish Marappa <h.marappa@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/things-manager/sampleapp/tizen/TMSampleApp/src/configuration.cpp
service/things-manager/sampleapp/tizen/TMSampleApp/src/group.cpp

index 4d09f54..ee434ed 100644 (file)
@@ -780,8 +780,6 @@ list_update_region_cb(void *data, Evas_Object *obj, void *event_info)
     if (NULL == popup_fields)
     {
         dlog_print(DLOG_INFO, LOG_TAG, "#### Memory allocation failed");
-        popup_fields->popup = NULL;
-        popup_fields->entry = NULL;
     }
     else
     {
index d2a70ee..5bce243 100644 (file)
@@ -954,8 +954,6 @@ list_scheduled_actionset_cb(void *data, Evas_Object *obj, void *event_info)
     if (NULL == popup_fields)
     {
         dlog_print(DLOG_INFO, LOG_TAG, "#### Memory allocation failed");
-        popup_fields->popup = NULL;
-        popup_fields->entry = NULL;
     }
     else
     {