From ae6d040ec3b36c46d61571bce7eee19698ceddda Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 9 Feb 2024 08:09:38 +0100 Subject: [PATCH] detect/http: report error on alloc failure (cherry picked from commit 7e4dba7dfbd063be554b6145b747d7879eaa1f84) --- src/detect-http-header.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.47.2