"Host: one.example.org\r\n"
"\r\n";
uint16_t buflen = strlen((char *)buf);
- Packet *p = SCMalloc(SIZE_OF_PACKET);
+ Packet *p = PacketGetFromAlloc();
FAIL_IF_NULL(p);
Signature *s = NULL;
ThreadVars th_v;
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
+ PacketFree(p);
HostBitsTestShutdown();
- SCFree(p);
PASS;
}
"Host: one.example.org\r\n"
"\r\n";
uint16_t buflen = strlen((char *)buf);
- Packet *p = SCMalloc(SIZE_OF_PACKET);
- if (unlikely(p == NULL))
- return 0;
+ Packet *p = PacketGetFromAlloc();
Signature *s = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
+ PacketFree(p);
HostBitsTestShutdown();
- SCFree(p);
PASS;
}
"Host: one.example.org\r\n"
"\r\n";
uint16_t buflen = strlen((char *)buf);
- Packet *p = SCMalloc(SIZE_OF_PACKET);
- if (unlikely(p == NULL))
- return 0;
+ Packet *p = PacketGetFromAlloc();
Signature *s = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
+ PacketFree(p);
HostBitsTestShutdown();
- SCFree(p);
PASS;
}
"Host: one.example.org\r\n"
"\r\n";
uint16_t buflen = strlen((char *)buf);
- Packet *p = SCMalloc(SIZE_OF_PACKET);
- if (unlikely(p == NULL))
- return 0;
+ Packet *p = PacketGetFromAlloc();
Signature *s = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
+ PacketFree(p);
if(gv) GenericVarFree(gv);
FLOW_DESTROY(&f);
- SCFree(p);
return result;
end:
DetectEngineCtxFree(de_ctx);
}
+ PacketFree(p);
+
if(gv) GenericVarFree(gv);
FLOW_DESTROY(&f);
- SCFree(p);
- return result;}
+ return result;
#endif
/**
"Host: one.example.org\r\n"
"\r\n";
uint16_t buflen = strlen((char *)buf);
- Packet *p = SCMalloc(SIZE_OF_PACKET);
- if (unlikely(p == NULL))
- return 0;
+ Packet *p = PacketGetFromAlloc();
Signature *s = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
+ PacketFree(p);
FLOW_DESTROY(&f);
HostBitsTestShutdown();
- SCFree(p);
PASS;
}
"Host: one.example.org\r\n"
"\r\n";
uint16_t buflen = strlen((char *)buf);
- Packet *p = SCMalloc(SIZE_OF_PACKET);
- if (unlikely(p == NULL))
- return 0;
+ Packet *p = PacketGetFromAlloc();
Signature *s = NULL;
ThreadVars th_v;
DetectEngineThreadCtx *det_ctx = NULL;
DetectEngineThreadCtxDeinit(&th_v, (void *)det_ctx);
DetectEngineCtxFree(de_ctx);
+ PacketFree(p);
FLOW_DESTROY(&f);
HostBitsTestShutdown();
- SCFree(p);
PASS;
}
#endif /* UNITTESTS */