From 33a1a12b153baa45ae5b4059bcb81a60de50815c Mon Sep 17 00:00:00 2001 From: "Russ Combs (rucombs)" Date: Thu, 6 Oct 2016 16:58:12 -0400 Subject: [PATCH] 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 --- src/service_inspectors/sip/sip_dialog.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.47.2