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-7.0.4~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10355%2Fhead;p=thirdparty%2Fsuricata.git detect/http: report error on alloc failure (cherry picked from commit 7e4dba7dfbd063be554b6145b747d7879eaa1f84) --- diff --git a/src/detect-http-header.c b/src/detect-http-header.c index 8a78380428..cd36ea597c 100644 --- a/src/detect-http-header.c +++ b/src/detect-http-header.c @@ -603,6 +603,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;