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 */ /* enable the sig in the bitarray */
io_ctx->sig_init_array[(s->num/8)] |= 1 << (s->num % 8); 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 #ifdef UNITTESTS

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

Loading…
Cancel
Save