Skip to content

Commit

Permalink
detect/http: report error on alloc failure
Browse files Browse the repository at this point in the history
(cherry picked from commit 7e4dba7)
  • Loading branch information
victorjulien authored and inashivb committed Feb 9, 2024
1 parent 6d69ed9 commit ae6d040
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/detect-http-header.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ae6d040

Please sign in to comment.