#include "alert-unified2-alert.h"
#include "decode-ipv4.h"
+#include "host.h"
+#include "util-profiling.h"
+#include "decode.h"
+
#include "util-error.h"
#include "util-debug.h"
#include "util-time.h"
DecodeEthernet(&tv, &dtv, p, raw_ipv4_tcp, sizeof(raw_ipv4_tcp), &pq);
- FlowShutdown();
oc = Unified2AlertInitCtx(NULL);
if (oc == NULL) {
- SCFree(p);
- return 0;
+ goto end;
}
lf = (LogFileCtx *)oc->data;
if(lf == NULL) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2AlertThreadInit(&tv, oc, &data);
if(ret == TM_ECODE_FAILED) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2Alert(&tv, p, data, &pq, NULL);
if(ret == TM_ECODE_FAILED) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2AlertThreadDeinit(&tv, data);
if(ret == -1) {
- SCFree(p);
- return 0;
+ goto end;
}
Unified2AlertDeInitCtx(oc);
- PACKET_CLEANUP(p);
+ PACKET_RECYCLE(p);
SCFree(p);
+ FlowShutdown();
return 1;
+
+end:
+ PACKET_RECYCLE(p);
+ SCFree(p);
+ FlowShutdown();
+ return 0;
}
/**
DecodeEthernet(&tv, &dtv, p, raw_ipv6_tcp, sizeof(raw_ipv6_tcp), &pq);
- FlowShutdown();
-
oc = Unified2AlertInitCtx(NULL);
if (oc == NULL) {
- SCFree(p);
- return 0;
+ goto end;
}
lf = (LogFileCtx *)oc->data;
if(lf == NULL) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2AlertThreadInit(&tv, oc, &data);
if(ret == -1) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2Alert(&tv, p, data, &pq, NULL);
if(ret == TM_ECODE_FAILED) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2AlertThreadDeinit(&tv, data);
if(ret == -1) {
- SCFree(p);
- return 0;
+ goto end;
}
Unified2AlertDeInitCtx(oc);
- PACKET_CLEANUP(p);
+ PACKET_RECYCLE(p);
SCFree(p);
+ FlowShutdown();
return 1;
+
+end:
+ PACKET_RECYCLE(p);
+ SCFree(p);
+ FlowShutdown();
+ return 0;
}
0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x65, 0x74,
0x0d, 0x0a};
Packet *p = PacketGetFromAlloc();
+ Packet *pkt;
if (unlikely(p == NULL))
return 0;
int ret;
DecodeEthernet(&tv, &dtv, p, raw_gre, sizeof(raw_gre), &pq);
- FlowShutdown();
-
oc = Unified2AlertInitCtx(NULL);
if (oc == NULL) {
- SCFree(p);
- return 0;
+ goto end;
}
lf = (LogFileCtx *)oc->data;
if(lf == NULL) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2AlertThreadInit(&tv, oc, &data);
if(ret == -1) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2Alert(&tv, p, data, &pq, NULL);
if(ret == TM_ECODE_FAILED) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2AlertThreadDeinit(&tv, data);
if(ret == -1) {
- SCFree(p);
- return 0;
+ goto end;
}
Unified2AlertDeInitCtx(oc);
- Packet *pkt = PacketDequeue(&pq);
+ pkt = PacketDequeue(&pq);
while (pkt != NULL) {
+ PACKET_RECYCLE(pkt);
SCFree(pkt);
pkt = PacketDequeue(&pq);
}
- PACKET_CLEANUP(p);
+ PACKET_RECYCLE(p);
SCFree(p);
+ FlowShutdown();
return 1;
+
+end:
+ pkt = PacketDequeue(&pq);
+ while (pkt != NULL) {
+ PACKET_RECYCLE(pkt);
+ SCFree(pkt);
+ pkt = PacketDequeue(&pq);
+ }
+ PACKET_RECYCLE(p);
+ SCFree(p);
+ FlowShutdown();
+ return 0;
}
/**
DecodePPP(&tv, &dtv, p, raw_ppp, sizeof(raw_ppp), &pq);
- FlowShutdown();
-
oc = Unified2AlertInitCtx(NULL);
if (oc == NULL) {
- SCFree(p);
- return 0;
+ goto end;
}
lf = (LogFileCtx *)oc->data;
if(lf == NULL) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2AlertThreadInit(&tv, oc, &data);
if(ret == -1) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2Alert(&tv, p, data, &pq, NULL);
if(ret == TM_ECODE_FAILED) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2AlertThreadDeinit(&tv, data);
if(ret == -1) {
- SCFree(p);
- return 0;
+ goto end;
}
Unified2AlertDeInitCtx(oc);
- PACKET_CLEANUP(p);
+ PACKET_RECYCLE(p);
SCFree(p);
+ FlowShutdown();
return 1;
+
+end:
+ PACKET_RECYCLE(p);
+ SCFree(p);
+ FlowShutdown();
+ return 0;
}
/**
DecodeEthernet(&tv, &dtv, p, raw_ipv4_tcp, sizeof(raw_ipv4_tcp), &pq);
- FlowShutdown();
-
p->action = ACTION_DROP;
oc = Unified2AlertInitCtx(NULL);
if (oc == NULL) {
- SCFree(p);
- return 0;
+ goto end;
}
lf = (LogFileCtx *)oc->data;
if(lf == NULL) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2AlertThreadInit(&tv, oc, &data);
if(ret == -1) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2Alert(&tv, p, data, &pq, NULL);
if(ret == TM_ECODE_FAILED) {
- SCFree(p);
- return 0;
+ goto end;
}
ret = Unified2AlertThreadDeinit(&tv, data);
if(ret == TM_ECODE_FAILED) {
- SCFree(p);
- return 0;
+ goto end;
}
Unified2AlertDeInitCtx(oc);
- PACKET_CLEANUP(p);
+ PACKET_RECYCLE(p);
SCFree(p);
+ FlowShutdown();
return 1;
+
+end:
+ PACKET_RECYCLE(p);
+ SCFree(p);
+ FlowShutdown();
+ return 0;
}
/**
#include "util-debug.h"
#include "util-print.h"
+#include "pkt-var.h"
+#include "util-profiling.h"
+#include "host.h"
+
/**
* \brief Get variables and do some checks of the embedded IPV6 packet
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (p->icmpv6h == NULL) {
SCLogDebug("ICMPv6 Unable to detect icmpv6 layer from ipv6");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (p->icmpv6h == NULL) {
SCLogDebug("ICMPv6 Unable to detect icmpv6 layer from ipv6");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (p->icmpv6h == NULL) {
SCLogDebug("ICMPv6 Unable to detect icmpv6 layer from ipv6");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (p->icmpv6h == NULL) {
SCLogDebug("ICMPv6 Unable to detect icmpv6 layer from ipv6");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (p->icmpv6h == NULL) {
SCLogDebug("ICMPv6 Unable to detect icmpv6 layer from ipv6");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (p->icmpv6h == NULL) {
SCLogDebug("ICMPv6 Unable to detect icmpv6 layer from ipv6");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (p->icmpv6h == NULL) {
SCLogDebug("ICMPv6 Unable to detect icmpv6 layer from ipv6");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (p->icmpv6h == NULL) {
SCLogDebug("ICMPv6 Unable to detect icmpv6 layer from ipv6");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (!ENGINE_ISSET_EVENT(p, ICMPV6_PKT_TOO_SMALL)) {
SCLogDebug("ICMPv6 Error: event packet too small not set");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (!ENGINE_ISSET_EVENT(p, ICMPV6_IPV6_TRUNC_PKT)) {
SCLogDebug("ICMPv6 Error: embedded ipv6 truncated packet event not set");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (!ENGINE_ISSET_EVENT(p, ICMPV6_UNKNOWN_CODE)) {
SCLogDebug("ICMPv6 Error: Unknown code event not set");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (!ENGINE_ISSET_EVENT(p, ICMPV6_UNKNOWN_CODE)) {
SCLogDebug("ICMPv6 Error: Unknown code event not set");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeIPV6(&tv, &dtv, p, raw_ipv6, sizeof(raw_ipv6), NULL);
- FlowShutdown();
if (p->payload == NULL) {
printf("payload == NULL, expected non-NULL: ");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
goto end;
}
- PACKET_CLEANUP(p);
+ PACKET_RECYCLE(tp);
SCFree(tp);
end:
DefragDestroy();
+ PACKET_RECYCLE(p);
FlowShutdown();
- PACKET_CLEANUP(p);
SCFree(p);
return result;
}
}
result = 1;
- PACKET_CLEANUP(p);
+ PACKET_RECYCLE(tp);
SCFree(tp);
end:
DefragDestroy();
+ PACKET_RECYCLE(p);
FlowShutdown();
- PACKET_CLEANUP(p);
SCFree(p);
return result;
}
goto end;
}
- PACKET_CLEANUP(p);
+ PACKET_RECYCLE(tp);
SCFree(tp);
end:
DefragDestroy();
+ PACKET_RECYCLE(p);
FlowShutdown();
- PACKET_CLEANUP(p);
SCFree(p);
return result;
}
#include "util-debug.h"
#include "util-print.h"
#include "util-unittest.h"
+#include "util-profiling.h"
+#include "host.h"
#define IPV6_EXTHDRS ip6eh.ip6_exthdrs
#define IPV6_EH_CNT ip6eh.ip6_exthdrs_cnt
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20,
};
+ Packet *pkt;
Packet *p1 = PacketGetFromAlloc();
if (unlikely(p1 == NULL))
return 0;
result = 1;
end:
- PACKET_CLEANUP(p1);
- PACKET_CLEANUP(p2);
+ PACKET_RECYCLE(p1);
+ PACKET_RECYCLE(p2);
SCFree(p1);
SCFree(p2);
+ pkt = PacketDequeue(&pq);
+ while (pkt != NULL) {
+ PACKET_RECYCLE(pkt);
+ SCFree(pkt);
+ pkt = PacketDequeue(&pq);
+ }
DefragDestroy();
FlowShutdown();
return result;
result = 1;
end:
- PACKET_CLEANUP(p1);
+ PACKET_RECYCLE(p1);
SCFree(p1);
FlowShutdown();
return result;
#include "util-unittest.h"
#include "util-debug.h"
+#include "pkt-var.h"
+#include "util-profiling.h"
+#include "host.h"
+
+
void DecodeRaw(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, uint8_t *pkt, uint16_t len, PacketQueue *pq)
{
SCPerfCounterIncr(dtv->counter_raw, tv->sc_perf_pca);
return 1;
}
+ PACKET_RECYCLE(p);
FlowShutdown();
SCFree(p);
return 0;
FlowInitConfig(FLOW_QUIET);
DecodeRaw(&tv, &dtv, p, raw_ip, GET_PKT_LEN(p), NULL);
- FlowShutdown();
if (p->ip4h == NULL) {
printf("expected a valid ipv4 header but it was NULL: ");
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return 1;
}
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return 0;
}
} else {
printf("expected IPRAW_INVALID_IPV to be set but it wasn't: ");
}
+ PACKET_RECYCLE(p);
FlowShutdown();
SCFree(p);
return 1;
#include "util-debug.h"
#include "util-optimize.h"
#include "flow.h"
+#include "util-profiling.h"
+#include "pkt-var.h"
+#include "host.h"
static int DecodeTCPOptions(Packet *p, uint8_t *pkt, uint16_t len)
{
FlowInitConfig(FLOW_QUIET);
DecodeTCP(&tv, &dtv, p, raw_tcp, sizeof(raw_tcp), NULL);
- FlowShutdown();
if (p->tcph == NULL) {
printf("tcp packet decode failed: ");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeTCP(&tv, &dtv, p, raw_tcp, sizeof(raw_tcp), NULL);
- FlowShutdown();
if (p->tcph == NULL) {
printf("tcp packet decode failed: ");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeTCP(&tv, &dtv, p, raw_tcp, sizeof(raw_tcp), NULL);
- FlowShutdown();
if (p->tcph == NULL) {
printf("tcp packet decode failed: ");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
FlowInitConfig(FLOW_QUIET);
DecodeTCP(&tv, &dtv, p, raw_tcp, sizeof(raw_tcp), NULL);
- FlowShutdown();
if (p->tcph == NULL) {
printf("tcp packet decode failed: ");
retval = 1;
end:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return retval;
}
#include "util-unittest.h"
#include "util-debug.h"
+#include "pkt-var.h"
+#include "util-profiling.h"
+#include "host.h"
+
/**
* \internal
* \brief this function is used to decode IEEE802.1q packets
DecodeVLAN(&tv, &dtv, p, raw_vlan, sizeof(raw_vlan), NULL);
- FlowShutdown();
if(p->vlanh == NULL) {
- SCFree(p);
- return 0;
+ goto error;
}
if(ENGINE_ISSET_EVENT(p,VLAN_HEADER_TOO_SMALL)) {
- SCFree(p);
- return 0;
+ goto error;
}
if(ENGINE_ISSET_EVENT(p,VLAN_UNKNOWN_TYPE)) {
- SCFree(p);
- return 0;
+ goto error;
}
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return 1;
+
+error:
+ PACKET_RECYCLE(p);
+ FlowShutdown();
+ SCFree(p);
+ return 0;
}
#endif /* UNITTESTS */
#include "util-spm-bm.h"
#include "threads.h"
#include "util-unittest-helper.h"
+#include "pkt-var.h"
+#include "host.h"
+#include "util-profiling.h"
int DetectContentMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *, Signature *, SigMatch *);
int DetectContentSetup(DetectEngineCtx *, Signature *, char *);
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
}
+ PACKET_RECYCLE(p);
FlowShutdown();
SCFree(p);
#include "util-unittest.h"
#include "util-debug.h"
+#include "pkt-var.h"
+#include "host.h"
+#include "util-profiling.h"
+
/* prototypes for the "ipv4-csum" rule keyword */
int DetectIPV4CsumMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
Signature *, SigMatch *);
}
StreamTcpFreeConfig(TRUE);
+ PACKET_RECYCLE(p);
FlowShutdown();
SCFree(p);
#include "util-debug.h"
#include "util-byte.h"
+#include "pkt-var.h"
+#include "host.h"
+#include "util-profiling.h"
+
/**
* dsize:[<>]<0-65535>[<><0-65535>];
*/
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
+ PACKET_RECYCLE(p);
FlowShutdown();
end:
SCFree(p);
#include "util-debug.h"
#include "util-error.h"
+#include "pkt-var.h"
+#include "host.h"
+#include "util-profiling.h"
+
static int DetectPortCutNot(DetectPort *, DetectPort **);
static int DetectPortCut(DetectEngineCtx *, DetectPort *, DetectPort *,
DetectPort **);
FlowInitConfig(FLOW_QUIET);
Packet *p = UTHBuildPacketFromEth(raw_eth_pkt, pktsize);
result = UTHPacketMatchSig(p, sig);
+ PACKET_RECYCLE(p);
FlowShutdown();
return result;
}
#include "detect-engine.h"
#include "detect-engine-mpm.h"
+#include "pkt-var.h"
+#include "host.h"
+#include "util-profiling.h"
+
/* name modifiers value */
#define PARSE_REGEX "^\\s*([a-zA-Z][\\w\\d_.]+)\\s*,\\s*([+=-]{1}|==|!=|<|<=|>|>=|isset|notset)\\s*,?\\s*([a-zA-Z][\\w\\d]+|[\\d]{1,10})?\\s*$"
/* Varnames must begin with a letter */
break;
}
SCLogDebug("Raw Packet %d has %u alerts ", i, p->alerts.cnt);
+ PACKET_RECYCLE(p);
}
SigGroupCleanup(de_ctx);
if (de_ctx)
DetectEngineCtxFree(de_ctx);
+ PACKET_RECYCLE(p);
FlowShutdown();
SCFree(p);
return result;
break;
}
SCLogDebug("Raw Packet %d has %u alerts ", i, p->alerts.cnt);
+ PACKET_RECYCLE(p);
}
SigGroupCleanup(de_ctx);
break;
}
SCLogDebug("Raw Packet %d has %u alerts ", i, p->alerts.cnt);
+ PACKET_RECYCLE(p);
}
SigGroupCleanup(de_ctx);
#include "util-unittest.h"
#include "util-debug.h"
+#include "pkt-var.h"
+#include "host.h"
+#include "util-profiling.h"
+
/**
* Regex
* fragbits: [!+*](MDR)
DecodeEthernet(&tv, &dtv, p, raw_eth, sizeof(raw_eth), NULL);
- FlowShutdown();
de = DetectFragBitsParse("!D");
if(ret) {
if (de) SCFree(de);
if (sm) SCFree(sm);
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return 1;
}
error:
if (de) SCFree(de);
if (sm) SCFree(sm);
+ PACKET_RECYCLE(p);
+ FlowShutdown();
SCFree(p);
return 0;
}
#include "detect-ipproto.h"
#include "detect-flow.h"
+#include "pkt-var.h"
+#include "host.h"
+#include "util-profiling.h"
+#include "decode.h"
+
#include "flow.h"
#include "util-rule-vars.h"
result = UTHCheckPacketMatchResults(p, sids, results, 1);
end:
- if (p != NULL)
+ if (p != NULL) {
+ PACKET_RECYCLE(p);
SCFree(p);
+ }
if (de_ctx != NULL) {
SigCleanSignatures(de_ctx);
SigGroupCleanup(de_ctx);
result = 1;
}
+ if (p != NULL) {
+ PACKET_RECYCLE(p);
+ }
FlowShutdown();
//PatternMatchDestroy(mpm_ctx);
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
#include "util-debug.h"
+#include "pkt-var.h"
+#include "host.h"
+#include "util-profiling.h"
+
static int DetectReplaceSetup (DetectEngineCtx *, Signature *, char *);
void DetectReplaceRegisterTests(void);
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
}
+ PACKET_RECYCLE(p);
FlowShutdown();
SCFree(p);
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
//PatternMatchDestroy(mpm_ctx);
DetectEngineCtxFree(de_ctx);
+ PACKET_RECYCLE(p);
FlowShutdown();
SCFree(p);
if(de_ctx)
DetectEngineCtxFree(de_ctx);
+ if (p != NULL)
+ PACKET_RECYCLE(p);
+
FlowShutdown();
SCFree(p);
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
+
+ PACKET_RECYCLE(p);
FlowShutdown();
SCFree(p);
if(de_ctx)
DetectEngineCtxFree(de_ctx);
+ if (p != NULL)
+ PACKET_RECYCLE(p);
+
FlowShutdown();
SCFree(p);
if (de_ctx != NULL)
DetectEngineCtxFree(de_ctx);
- FlowShutdown();
- if (p1 != NULL)
+ if (p1 != NULL) {
+ PACKET_RECYCLE(p1);
SCFree(p1);
- if (p2 != NULL)
+ }
+ if (p2 != NULL) {
+ PACKET_RECYCLE(p2);
SCFree(p2);
- if (p3 != NULL)
+ }
+ if (p3 != NULL) {
+ PACKET_RECYCLE(p3);
SCFree(p3);
- if (p4 != NULL)
+ }
+ if (p4 != NULL) {
+ PACKET_RECYCLE(p4);
SCFree(p4);
+ }
+ FlowShutdown();
return result;
}