From: Victor Julien Date: Fri, 25 May 2012 10:47:57 +0000 (+0200) Subject: replace: add missing malloc return value check. X-Git-Tag: suricata-1.3beta2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5933cee2ff9c442b83614ada9a9c242c7b721967;p=thirdparty%2Fsuricata.git replace: add missing malloc return value check. --- 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;