Properly clean signature's ip only data.

remotes/origin/HEAD
Victor Julien 13 years ago
parent c7af0589bc
commit af97c36c08

@ -1515,6 +1515,10 @@ void IPOnlyAddSignature(DetectEngineCtx *de_ctx, DetectEngineIPOnlyCtx *io_ctx,
/* enable the sig in the bitarray */
io_ctx->sig_init_array[(s->num/8)] |= 1 << (s->num % 8);
/** no longer ref to this, it's in the table now */
s->CidrSrc = NULL;
s->CidrDst = NULL;
}
#ifdef UNITTESTS

@ -829,13 +829,11 @@ void SigFree(Signature *s) {
if (s == NULL)
return;
/* XXX GS there seems to be a bug in the IPOnlyCIDR list, which causes
system abort. */
/*if (s->CidrDst != NULL)
if (s->CidrDst != NULL)
IPOnlyCIDRListFree(s->CidrDst);
if (s->CidrSrc != NULL)
IPOnlyCIDRListFree(s->CidrSrc);*/
IPOnlyCIDRListFree(s->CidrSrc);
SigMatch *sm = s->sm_lists[DETECT_SM_LIST_MATCH], *nsm;
while (sm != NULL) {

Loading…
Cancel
Save