Skip to content

Commit

Permalink
detect/http: report error on alloc failure
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien committed Feb 9, 2024
1 parent b48ec8a commit 7e4dba7
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 @@ -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;
Expand Down

0 comments on commit 7e4dba7

Please sign in to comment.