]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
counters: hard fail on allocation failure during init
authorPhilippe Antoine <pantoine@oisf.net>
Tue, 22 Jul 2025 08:04:13 +0000 (10:04 +0200)
committerJason Ish <jason.ish@oisf.net>
Fri, 1 Aug 2025 16:54:14 +0000 (10:54 -0600)
Ticket: 7813

src/counters.c

index e6210404fc01420c73f0ca9bd1cfec13d52dd0c0..256d59fc726467e67909113d4e7988c75b82224a 100644 (file)
@@ -1104,7 +1104,7 @@ static int StatsThreadRegister(const char *thread_name, StatsPublicThreadContext
         id = HashTableLookup(stats_ctx->counters_id_hash, &t, sizeof(t));
         if (id == NULL) {
             id = SCCalloc(1, sizeof(*id));
-            DEBUG_VALIDATE_BUG_ON(id == NULL);
+            BUG_ON(id == NULL);
             id->id = counters_global_id++;
             id->string = pc->name;
 #ifdef DEBUG_VALIDATION