From: Jason Ish Date: Thu, 8 Feb 2024 19:21:11 +0000 (-0600) Subject: detect-http: add superfluous alloc check for cocci X-Git-Tag: suricata-8.0.0-beta1~1786 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f800ed0f901488d19fccf858ba0711792bf407ff;p=thirdparty%2Fsuricata.git detect-http: add superfluous alloc check for cocci Add not-needed SCCalloc return check to satisfy our Cocci malloc checks as it can't see that the caller immediately checks the return value of this simple wrapper around SCCalloc. --- diff --git a/src/detect-http-header.c b/src/detect-http-header.c index 98e438c211..7c15bf094a 100644 --- a/src/detect-http-header.c +++ b/src/detect-http-header.c @@ -590,6 +590,11 @@ typedef struct HttpMultiBufHeaderThreadData { static void *HttpMultiBufHeaderThreadDataInit(void *data) { HttpMultiBufHeaderThreadData *td = SCCalloc(1, sizeof(*td)); + + /* This return value check to satisfy our Cocci malloc checks. */ + if (td == NULL) { + return NULL; + } return td; }