From: Russ Combs (rucombs) Date: Thu, 6 Oct 2016 20:58:12 +0000 (-0400) Subject: Merge pull request #658 in SNORT/snort3 from sip_war to master X-Git-Tag: 3.0.0-233~236 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33a1a12b153baa45ae5b4059bcb81a60de50815c;p=thirdparty%2Fsnort3.git Merge pull request #658 in SNORT/snort3 from sip_war to master Squashed commit of the following: commit 0fc3a2e2090c98bb59dc9b807ad67c1cb71d70ab Author: huica Date: Thu Oct 6 13:46:24 2016 -0400 Fix warnings from analysis --- diff --git a/src/service_inspectors/sip/sip_dialog.cc b/src/service_inspectors/sip/sip_dialog.cc index 0d1701440..2ebbe9fa7 100644 --- a/src/service_inspectors/sip/sip_dialog.cc +++ b/src/service_inspectors/sip/sip_dialog.cc @@ -78,7 +78,8 @@ static int SIP_processRequest(SIPMsg* sipMsg, SIP_DialogData* dialog, SIP_Dialog /*If dialog not exist, create one */ if ((NULL == dialog)&&(SIP_METHOD_CANCEL != sipMsg->methodFlag)) { - dialog = SIP_addDialog(sipMsg, dList->head, dList); + // Clang analyzer is false positive, dlist->head is updated after free + dialog = SIP_addDialog(sipMsg, dList->head, dList); // FIXIT-A } methodFlag = sipMsg->methodFlag; @@ -763,6 +764,7 @@ int SIP_updateDialog(SIPMsg* sipMsg, SIP_DialogList* dList, Packet* p, SIP_PROTO else ret = false; +#if 0 for (dialog = dList->head; dialog; dialog = dialog->nextD) @@ -770,7 +772,7 @@ int SIP_updateDialog(SIPMsg* sipMsg, SIP_DialogList* dList, Packet* p, SIP_PROTO if (sipMsg->dlgID.callIdHash == dialog->dlgID.callIdHash) break; } - +#endif //sip_update_appid(p, sipMsg, dialog); return ret;