From 1aba8f2799fbc3f9260ee5760a58f8925a6fefae Mon Sep 17 00:00:00 2001 From: Milind Ramesh Murhekar Date: Fri, 21 Apr 2017 14:57:33 +0530 Subject: [PATCH] Fixed SVACE issues and Code cleanup Description: This patch fixes the SVACE bugs Below are the GWID which are fixed under this patch 207062, 207075 Change-Id: Iece0ca22ce61f3991082f4cdb807c7db9fc45da7 Signed-off-by: Milind Ramesh Murhekar --- packaging/wifi-efl-ug.spec | 2 +- sources/libraries/Common/common_utils.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packaging/wifi-efl-ug.spec b/packaging/wifi-efl-ug.spec index 2d0514d..215512f 100644 --- a/packaging/wifi-efl-ug.spec +++ b/packaging/wifi-efl-ug.spec @@ -1,6 +1,6 @@ Name: wifi-efl-ug Summary: Wi-Fi UI Gadget for TIZEN -Version: 1.0.230 +Version: 1.0.231 Release: 1 Group: App/Network License: Flora-1.1 diff --git a/sources/libraries/Common/common_utils.c b/sources/libraries/Common/common_utils.c index 9343d99..4c89624 100755 --- a/sources/libraries/Common/common_utils.c +++ b/sources/libraries/Common/common_utils.c @@ -833,11 +833,6 @@ static inline int __get_model_from_model_config_xml(const char *field, char **va break; } - if (cur_ptr == NULL) { - xmlFreeDoc(xml_doc); - return -1; - } - cur_ptr = cur_ptr->xmlChildrenNode; for (cur_node = cur_ptr; cur_node; cur_node = cur_node->next) { if (!xmlStrcmp(cur_node->name, (const xmlChar*)FEATURE_TAG)) { @@ -857,6 +852,10 @@ static inline int __get_model_from_model_config_xml(const char *field, char **va for (cur_node = cur_ptr; cur_node; cur_node = cur_node->next) { if (cur_node->type == XML_ELEMENT_NODE) { node_name = (char *)xmlGetProp(cur_node, (const xmlChar*)"name"); + if (node_name == NULL) { + xmlFreeDoc(xml_doc); + return -1; + } if (!strncmp(node_name, field, strlen(node_name))) { node_value = (char *)xmlNodeListGetString(xml_doc, cur_node->xmlChildrenNode, 1); -- 2.7.4