diff --git a/src/detect-replace.c b/src/detect-replace.c index e70a2e1677a4..a5d0387457e5 100644 --- a/src/detect-replace.c +++ b/src/detect-replace.c @@ -179,24 +179,20 @@ int DetectReplaceSetup(DetectEngineCtx *de_ctx, Signature *s, const char *replac DetectReplaceList *DetectReplaceAddToList( DetectReplaceList *replist, uint8_t *found, const DetectContentData *cd) { - DetectReplaceList *newlist; - if (cd->content_len != cd->replace_len) return NULL; SCLogDebug("replace: Adding match"); - newlist = SCMalloc(sizeof(DetectReplaceList)); + DetectReplaceList *newlist = SCMalloc(sizeof(DetectReplaceList)); if (unlikely(newlist == NULL)) return replist; newlist->found = found; newlist->cd = cd; /* Push new value onto the front of the list. */ newlist->next = replist; - return newlist; } - void DetectReplaceExecuteInternal(Packet *p, DetectReplaceList *replist) { DetectReplaceList *tlist = NULL;