}
+void XmlFree(xmlChar* tmpXml)
+{
+ if (tmpXml != NULL) {
+ xmlFree(tmpXml);
+ tmpXml = NULL;
+ }
+}
+
void Sms3gppWapPushHandler::handleSIMessage(char* pPushBody, int PushBodyLen, bool isText, int simIndex)
{
MSG_BEGIN();
if (tmpXmlChar != NULL)
strncpy(pushMsg.href, (char*)tmpXmlChar, MAX_WAPPUSH_HREF_LEN-1);
+ XmlFree(tmpXmlChar);
+
tmpXmlChar = xmlGetProp(indNode, (xmlChar*)SMS_PUSH_XML_SI_ID_TAG);
if (tmpXmlChar != NULL)
strncpy(pushMsg.id, (char*)tmpXmlChar, MAX_WAPPUSH_ID_LEN-1);
+ XmlFree(tmpXmlChar);
+
tmpXmlChar = xmlGetProp(indNode, (xmlChar*)SMS_PUSH_XML_CREATED_TAG);
if (tmpXmlChar != NULL)
if (pushMsg.created == 0)
pushMsg.created = pushMsg.received;
+ XmlFree(tmpXmlChar);
+
tmpXmlChar = xmlGetProp(indNode, (xmlChar*)SMS_PUSH_XML_EXPIRES_TAG);
if (tmpXmlChar != NULL)
pushMsg.expires = convertXmlCharToSec((char*)tmpXmlChar);
+ XmlFree(tmpXmlChar);
+
tmpXmlChar = xmlGetProp(indNode, (xmlChar*)SMS_PUSH_XML_ACTION_TAG);
pushMsg.action = convertSIActionStrToEnum((char*)tmpXmlChar);
+ XmlFree(tmpXmlChar);
+
tmpXmlChar = xmlNodeListGetString(xmlDoc, indNode->xmlChildrenNode, 1);
if (tmpXmlChar == NULL) {
strncpy(pushMsg.href, (char*)tmpXmlChar, MAX_WAPPUSH_HREF_LEN-1);
+ XmlFree(tmpXmlChar);
+
tmpXmlChar = xmlGetProp(indNode, (xmlChar*)SMS_PUSH_XML_ACTION_TAG);
pushMsg.action = convertSLActionStrToEnum((char*)tmpXmlChar);