From: Victor Julien Date: Fri, 9 Feb 2024 07:09:38 +0000 (+0100) Subject: detect/http: report error on alloc failure X-Git-Tag: suricata-8.0.0-beta1~1784 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e4dba7dfbd063be554b6145b747d7879eaa1f84;p=thirdparty%2Fsuricata.git detect/http: report error on alloc failure --- diff --git a/src/detect-http-header.c b/src/detect-http-header.c index e32220576b..f433d9fc9f 100644 --- a/src/detect-http-header.c +++ b/src/detect-http-header.c @@ -593,6 +593,8 @@ static void *HttpMultiBufHeaderThreadDataInit(void *data) /* This return value check to satisfy our Cocci malloc checks. */ if (td == NULL) { + SCLogError("failed to allocate %" PRIuMAX " bytes: %s", (uintmax_t)sizeof(*td), + strerror(errno)); return NULL; } return td;