Merge in SNORT/snort3 from ~OSHUMEIK/snort3:fix_nullptr_memman to master
Squashed commit of the following:
commit
09db004f568e7d14f81aad4d30533e3f758e6b0c
Author: Oleksii Shumeiko <oshumeik@cisco.com>
Date: Mon Apr 24 14:24:37 2023 +0300
memory: provide a default value for pointers if the module has not been initialized
static size_t stats_mib[2], mib_len = 2;
-static THREAD_LOCAL uint64_t* alloc_ptr = nullptr;
-static THREAD_LOCAL uint64_t* dealloc_ptr = nullptr;
+static const uint64_t alloc_zero = 0;
+static const uint64_t dealloc_zero = 0;
+static THREAD_LOCAL const uint64_t* alloc_ptr = &alloc_zero;
+static THREAD_LOCAL const uint64_t* dealloc_ptr = &dealloc_zero;
static ControlConn* s_ctrlconn = nullptr;
static void log_jem_stats(void *,const char *buf)