detect/replace: minor code cleanup

pull/9939/head
Victor Julien 2 years ago committed by Victor Julien
parent 3d7e0927bf
commit a3ac3e69d6

@ -179,24 +179,20 @@ error:
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;

Loading…
Cancel
Save