diff --git a/src/detect-replace.c b/src/detect-replace.c index 2e45110c3d..3da0a6374e 100644 --- a/src/detect-replace.c +++ b/src/detect-replace.c @@ -155,6 +155,8 @@ DetectReplaceList * DetectReplaceAddToList(DetectReplaceList *replist, uint8_t * SCLogDebug("replace: Adding match"); newlist = SCMalloc(sizeof(DetectReplaceList)); + if (newlist == NULL) + return NULL; newlist->found = found; newlist->cd = cd; newlist->next = NULL;