diff --git a/src/detect-content.c b/src/detect-content.c index a38573db3f..c06969514d 100644 --- a/src/detect-content.c +++ b/src/detect-content.c @@ -219,7 +219,7 @@ DetectContentData *DetectContentParse(SpmGlobalThreadCtx *spm_global_thread_ctx, cd = SCCalloc(1, sizeof(DetectContentData) + len); if (unlikely(cd == NULL)) { SCFree(content); - exit(EXIT_FAILURE); + return NULL; } cd->content = (uint8_t *)cd + sizeof(DetectContentData); diff --git a/src/detect-parse.c b/src/detect-parse.c index ae91063a00..ae7ca31be8 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -2289,7 +2289,7 @@ static DetectMatchAddressIPv4 *SigBuildAddressMatchArrayIPv4( } DetectMatchAddressIPv4 *addr_match4 = SCCalloc(cnt, sizeof(DetectMatchAddressIPv4)); if (addr_match4 == NULL) { - exit(EXIT_FAILURE); + return NULL; } uint16_t idx = 0; @@ -2315,7 +2315,7 @@ static DetectMatchAddressIPv6 *SigBuildAddressMatchArrayIPv6( DetectMatchAddressIPv6 *addr_match6 = SCCalloc(cnt, sizeof(DetectMatchAddressIPv6)); if (addr_match6 == NULL) { - exit(EXIT_FAILURE); + return NULL; } uint16_t idx = 0;