From: Junghyun Yeon Date: Fri, 17 Jan 2020 01:33:50 +0000 (+0900) Subject: Resolve static analysis issue X-Git-Tag: accepted/tizen/unified/20200120.133151~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d5895abb99e19a2b9a5482489c034a58d73b413;p=platform%2Fcore%2Fappfw%2Fwgt-backend.git Resolve static analysis issue Change-Id: I97616611b142e81b8457e653a0a8218b7419a442 Signed-off-by: Junghyun Yeon --- diff --git a/src/hybrid/step/pkgmgr/step_merge_xml.cc b/src/hybrid/step/pkgmgr/step_merge_xml.cc index e36e542..529545c 100644 --- a/src/hybrid/step/pkgmgr/step_merge_xml.cc +++ b/src/hybrid/step/pkgmgr/step_merge_xml.cc @@ -90,6 +90,8 @@ xmlNodePtr StepMergeXml::GetXmlNode(const xmlDocPtr doc, xmlXPathObjectPtr obj = xmlXPathEvalExpression((const xmlChar*)expr.c_str(), ctxt); if (!obj || !obj->nodesetval || !obj->nodesetval->nodeNr) { + if (obj) + xmlXPathFreeObject(obj); xmlXPathFreeContext(ctxt); return nullptr; } @@ -140,7 +142,7 @@ bool StepMergeXml::SetTpkPrivilegeType() { xmlSetProp(node, kPrivilegeTypeAttributeKey, (const xmlChar*)"tpk"); } } - + xmlXPathFreeObject(xpath_obj); xmlXPathFreeContext(xpath_ctx); return true;